Questions tagged as 'json'

2
answers

I want to convert a JSON to a javascript object [duplicated]

I want to convert a JSON to a javascript object but it gives me this error:    Uncaught SyntaxError: Unexpected token or in JSON at position 1 at   JSON.parse () at convertJsontoObjetoJS   (Test_JSON-serializacion.js: 23) at onload (Text_ht...
asked by 11.12.2018 / 02:22
2
answers

JSON RECORD IT

I have this JSON { "id":2, "group_id":1, "default_billing":"2", "default_shipping":"2", "created_at":"2018-10-03 16:12:55", "updated_at":"2018-10-03 16:13:00", "created_in":"Default Store View", "email":"henryar...
asked by 06.12.2018 / 18:18
2
answers

I can not solve the error: TypeError: Object of type method-wrapper is not JSON serializable

# Import(s) # import json from chat import message_handler as me import random ############# mind = {"message": "null","mID": 0,"reply": "null"} def learn(m): getMessage = m getReply = me.reply strReply = getReply.__str__ min...
asked by 17.11.2018 / 22:37
1
answer

I want to write to a file without replacing the text with a "dict" without the "" of the string

mind = {"message": "null", "mID": "0", "reply": "null"} mind["mID"] = random.randint(0,1000000000000) mind["message"] = getMessage mind["reply"] = strReply Assuming a hypothetical operation only, you would want to get that by calling the...
asked by 18.11.2018 / 00:49
1
answer

php decode json received via _POST

I have the following case: I receive a variable _POST that brings two data in JSON format and I need only take one of those data. I try this, but the result is NULL. Any suggestions? Thank you very much <?php $CuentasBancariasSel...
asked by 20.11.2018 / 03:09
2
answers

Bring everything from MySql with PHP and show in JSON

I have a problem with PHP and JSON. What I do is try to bring all the data from the database, but it only shows me the first one. If I put a WHERE it brings me the right one but I want everyone and it only brings me the first one. I do not under...
asked by 22.11.2018 / 16:43
1
answer

GET "UID" IN JSON (PHP)

Hello friends, I need your knowledge to solve this small problem, I want to get the UID that is within IMAGES / RESULTS / matrix / i / models ... I have a code that I am using, I hope with all my heart to help me. $url = 'https://pastebi...
asked by 12.11.2018 / 02:49
2
answers

How to store the value of a json result, remove it from the ajax and convert it to global? [duplicate]

I need the user's data that I'm getting via ajax using json and store them in a variable so I can use it outside of ajax. The user data variable should store the data but when the stored ones are only displayed while it is inside the ajax and...
asked by 12.10.2018 / 06:44
3
answers

JSON sent from PHP and read it in JAVASCRIPT

I have implemented a function in javaScript that takes the indicated value and then queries it with php in the database but when I came back with a php JSON and read it in javaScript I can not get the data JavaScript Code: function capturar...
asked by 06.10.2018 / 14:47
1
answer

Read Json in js

I have the following arrays in php $api = array( 'PlnDir' => $PlnDir, 'Agr' => $Agr, 'Emp' => $Emp, 'Admin' => $Admin ); $datos = array( 'menuPV' =>...
asked by 03.11.2018 / 00:18