Questions tagged [rfc4627]

RFC 4627 defines the JSON format as used in the application/json MIME media type.

RFC 4627 defines the JSON format as used in the application/json MIME media type. If your question is about JSON and not specifically about RFC 4627, use the tag and not this one.

8 questions
134
votes
6 answers

Can an array be top-level JSON-text?

per the debate in this post: json-conversion-in-javascript
Dustin Getz
  • 21,282
  • 15
  • 82
  • 131
3
votes
2 answers

Uniqueness of JSON object names as per RFC 4627

According to RFC 4627 section 2.2: 2.2. Objects An object structure is represented as a pair of curly brackets surrounding zero or more name/value pairs (or members). A name is a string. A single colon comes after each name, separating the…
2
votes
2 answers

Does JSON 'officially' Support Conversion of Native Types?

In PHP, you can use json_encode to encode an object as a json string. $string = json_encode($some_object); However, PHP has the standard slew of datatypes which are not considered objects (ints, strings, etc.) If you pass in a string to…
Alana Storm
  • 164,128
  • 91
  • 395
  • 599
1
vote
2 answers

Strange Error occurance in Erlang rfc4627

{ok,RequestData,_} = rfc4627:decode(Arg#arg.clidata) When it match the Output of rfc4627:decode(Arg#arg.clidata) to {ok,RequestData,_} it gives a {badmatch, ....} error But I Copied the output in the error msg and matched to …
0
votes
2 answers

Erlang cowboy reply json data , float number precision is wrong?

code is here : RstJson = rfc4627:encode({obj, [{"age", 45.99}]}), {ok, Req3} = cowboy_req:reply(200, [{<<"Content-Type">>, <<"application/json;charset=UTF-8">>}], RstJson, Req2) then I get this wrong data from front client: { "age":…
Ensk
  • 41
  • 8
0
votes
1 answer

JSON validation fails (RFC 4627)

I have an Api method which returns json data. When I try to validate the json data using the online json validator: http://pro.jsonlint.com/, with the compare option, giving url in one section and the output of the url in another section, the url…
zak
  • 310
  • 3
  • 19
0
votes
2 answers

JSON RFC 4627: whats the meaning of "false = %x66.61.6c.73.65 ; false"

I'm reading RFC 4627 (http://www.ietf.org/rfc/rfc4627.txt). In para 2.1, It talks about three literal names true, false, null. false = %x66.61.6c.73.65 ; false null = %x6e.75.6c.6c ; null true = %x74.72.75.65 ; true I…
zubair
  • 407
  • 1
  • 5
  • 7
-2
votes
1 answer

Get a specific data from a json array in erlang using rfc4627

This is the output I get after running following 2 commands. Wc = os:cmd("curl -s -k -X GET 'http://10.210.12.158:10065/iot/get/task_id?id=1'"), WW = decode_json(Wc), OUTPUT --- {ok,{obj,[{"status",200}, {"data", [{obj,[{"id",1}, …