Skip to content
Advertisement

Tag: json

How to find a time between nested Json

I have created a table called ticket_manager with the following structure: Each time when the user based QR Code gets scanned it will add a new row (either when it’s a check-in it will add a new line to “checkIn with “check_in_$count” or a new line to checkOut with “check_out_$count” -> So for example “check_in_0 is a pair with “check_out_0″so..

Turning a CSV into a nested JSON object in PHP, Drupal 8

I’m trying to turn a CSV into a JSON object made of nested arrays for each row within the file. I’ve tried a handful of similar SO questions but haven’t found quite the right solution. I’m attempting to set up a JSON object with a handful of nested objects, based on the first value in each row of the CSV.

Using Guzzle to retrieve API via (POST), unable to pass JSON parameters for query

I have created an API request, it connects to the server fine and passes basic authentication. The error I receive is “Uncaught GuzzleHttpExceptionClientException: Client error: POST http://my.api.com/dest/addr resulted in a 400 Bad Request response: {“code”:400,”result”:”Missing customer id” I have tried many ways to pass the query parameters and none of them have worked. I checked to make sure the JSON

Ajax JSON.parse JSONarray

I am trying populate a form from a mysqli database when an option is selected from a drop down. I am trying to do this with an ajax ‘get’ call to a PHP page. The PHP page does the SQL query and returns the results, then I do a json_encode of the data. This puts the JSON into an array.

PHP json_encode to C# Object unable to convert

I have this array of objects that contains some strings and an array of strings that I want to return from my server: “[{“original_file_name”:”Plain_HAIR.pdf”,”encrypted_file_name”:”UTTSJG13V1EC46J.pdf”,”is_successful”:true,”message”:””,”email”:”[“testuser@gmail.com”]”,”doctype”:”HAIR”}]” On my local app, I have a class that looks like this: The issue is that when it comes back to the local app, I get an error saying : {“Error converting value “[{“original_file_name”:”Plain_HAIR.pdf”,”encrypted_file_name”:”UTTSJG13V1EC46J.pdf”,”is_successful”:true,”message”:””,”email”:”[“testuser@gmail.com”]”,”doctype”:”HAIR”}]” to type

PHP MYSQL Select OneToMany as a nested json

I’ve two tables, one being the Customer table and the other the Address table having a one to many between them. I want to select all customers with their respective addresses and displaying it something like this: My code is the following now: But it results in two records with same data but different address property. How could I achieve

Fetch json data if json still not created [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 11 months ago. Improve this question This is a sample of my form in php: I take all the values in $_GET and i want to pass them in json to

Sending a JSON string to HTML that is too large

I’m using Codeigniter4, and I generate a rather long JSON so that I can make map points with it. However, when I pass along the string with And attempted to unpack the string on the html side with I get a syntax error because the entire json string was not sent. I have tested my setup with a smaller amount

Advertisement