Skip to content
Advertisement

Tag: json

Access data from a json array

I have this type of json object coming from a curl endpoint response: i want to access full_name from that response and display it on my index.blade.php view page as a list of name like this: Please assist me to access the value from that array above. Answer You can do like this : Above code tested here

json rpc 2.0 in laravel api errors on add request

I add https://github.com/sajya/server for making json rpc over my laravel 8. I just follow the instructions provided here to test it https://sajya.github.io/docs/ All works for the basic example, But if I add params to the curl string an error is raised an error that i cannot understand: my code: my route api file: this request works: curl ‘http://127.0.0.1:8000/api/test1’ –data-binary ‘{“jsonrpc”:”2.0″,”method”:”pharmacies@ping”,”params”:[],”id”

type ‘_InternalLinkedHashMap’ is not a subtype of type ‘FutureOr<List>’

I have a Problem with my json.decode. I want to get some data from my website but when my website says {“Number”:5} i only get this error (type ‘_InternalLinkedHashMap<String, dynamic>’ is not a subtype of type ‘FutureOr<List>’). However if my website says string{“Number”:5} i get the correct output and this error FormatException: Unexpected character (at character 1). Here is my

Accessing JSON fields using PHP

I’m setting up a webhook handler that receives a POST. Since I’m not storing the data in a database for this, I’m just having the data print to a text file to see what everything is, using $_POST[‘data_json’]; returns the following object { “time_submitted”:[ “11:47 PM UTC” ], “page_uuid”:[ “657773c0-596b-4cad-b2f6-7e1e197f4df4” ], “phone_number”:[ “3335553344” ], “estimated_move_date”:[ “09/29/2020” ], “email”:[ “toweltest@test.com” ],

Add to a JSON object, with PHP

I’d like to increment a JSON object with a new given one but I can’t do it. I have the following JSON: The user will create more fields and I’d like to insert in the original JSON the new field that comes in this format: Answer Looks like you’re trying to add new elements to the root JSON object, in

Parsing Request, PHP/Laravel

This API is used by an access control device to report personnel pass-through records, After me (A third-party platform) called the API to a face recognition terminal or face recognition access control terminal. Calling direction: A face recognition terminal or face recognition access control terminal calls the API to a third-party platform. Request description: Request method: POST Request URL: /LAPI/V1.0/System/Event/Notification/PersonVerification

Advertisement