Questions tagged [JSON] (1908)


JQuery, JSON, iframe, and quotation marks do not work together

Produce upload file in an iframe(a different kind of way). In response, generate a JSON object where one of the fields is a string with the html describing the error. Question: How do I get this response from the server without breaking it? When I use .text() from JQuery all tags are removed. When I use .html() from JQuer...
Mittie.Witti asked October 14th 19 at 12:11

JSONP in UserJS Chrome

Tell me how to implement JSONP in UserJS Chrome? I understand that extensions do not have access to the global object? 1) i.e. you cannot declare myCallback make the script return myCallback(JSON) To access returned by the script: 2) callbackVar = JSON, to be able to remove globalObj[callbackVar], as well as the possibi...
Kathleen_Collins39 asked October 10th 19 at 14:22

json_encode and Cyrillic

Dear colleagues, prompt, please, how do you deal with that is this: $foo = array("key"=>"value");<br> $json = json_encode($foo);<br> var_dump($json);<br> /*Result: string(13) "{"name":null}" */<br> I read about json_safe_encode — but back (decode) does not work (is not showing "value"). In Genera...
trever6 asked October 10th 19 at 13:54

Using JSON in Spring MVC

Need advice on using org.springframework.web.servlet.view.json.MappingJacksonJsonView to render model in JSON format. Read a bunch of articles and posts on the forums, but never got to tie the mapping to the Spring — after deploying the app crashes with exception: Сould not instantiate bean class [org.springframework.web.s...
Brain_Deck asked October 10th 19 at 13:02

Editor with highlighting for JSON

Tell me any editor in which you can easily view JSON. By "comfortably" I mean: 1) Automatic pagination and display as hierarchy (even if I opened the file where everything is written in one line). 2) Backlight (at least the minimum, parenthesis there). There is a plugin for Foxes, but would like to use a standalone solut...
will_Lang asked October 10th 19 at 10:04

JSON not working in PHP

Hello, respected Hebraist. I had a problem, very much hope that we will be able to solve. But the problem lies in the fact that the functions json_encode() and json_decode() on my hosting is not working. In normal use, an error occurs: Fatal error: Call to undefined function json_encode() in ***.php When you use a help...
Darrel_Gottlieb asked October 10th 19 at 09:13

The JSON editor, JSON SEMA

Looking at using JSON for configs. In my opinion this is a good compromise of simplicity and flexibility. But editing the JSON manually is a thankless task, some quotes only how to write. Googled JSON editor. There are interesting options in the tree view to edit the object by adding the keys elements of arrays, nested obje...
samanta asked October 10th 19 at 06:50

Is it safe to insert JSON in HTML

Is it safe to insert JSON strings received from the user, directly in the page via a script tag? Whether it is through special html sequences to break the JSON, making a XSS? The JSON is generated by PHP function json_encode. Example. $queryData = json_encode(array('query' => isset($_GET['query']) ? $_GET['query'] : ",...
Tyshawn11 asked October 10th 19 at 06:15

python, json

The question is, get json from google translate and he doesn't want to parse out. What are you doing wrong? res = urllib2.urlopen(request).read()<br> data = json.loads(res) <br> produces the following Traceback (most recent call last):<br> File "./", line 27, in data = json.loads(res) <...
Gennaro.Ebert asked October 9th 19 at 21:45

Something to read on creating a RESTful API to a beginner ?

Good day to all, the task is to write a mobile app (specifically for iOS) that needs to communicate with the existing service. You want to develop a API for this service (currently just Rotom sent to the script xml-Ki, which it parses), which can later be used not only for the purposes of this application. The server part...
Rusty.Runolfsson asked October 9th 19 at 21:16