From Wikipedia, the free encyclopedia
Jump to navigation Jump to search


Uneval() partialy produces JSON, I believe what ti produces is subset of JSON (don't have proof). See . This should be mentioned with problems and what to avoid and such. ...

Removing paragraph about zip codes[edit]

I am removing the paragraph which discusses the pitfalls of representing zip codes as either numbers or as strings. This really has little to do with JSON and does not belong here.Dmeranda (talk)

“One potential pitfall of the free-form nature of JSON comes from the ability to write numbers as either numeric literals or quoted strings. For example, ZIP Codes in the northeastern U.S. begin with zeroes (for example, 06511 for New Haven, Connecticut). If written with quotes by one programmer but not by another, the leading zero could be dropped when exchanged between systems, when searched for within the same system, or when printed. In addition, postal codes in the U.S. are numbers but other countries use letters as well. The use of a JSON Schema (see below) should reduce this as a type of problem.”

Proposed merge of JSON-WSP into JSON[edit]

As it stands, a single paragraph in JSON should be enough to cover this topic. Keeping the page history of JSON-WSP and redirecting it to JSON is far better than deletion. davidwr/(talk)/(contribs) 19:25, 19 August 2020 (UTC)Reply[reply]

Images and video[edit]

This article does not refer to an ability to imbed images or video (nor does it state that it can't). An explicit mention in this article of whether images and video can be included in JSON would clarify this point (if the answer is yes, a description of how this is done would be useful). Thanks. FreeFlow99 (talk) 12:29, 20 November 2021 (UTC)Reply[reply]

The first point to note is JSON is a text format,

if you look at the standard you see "JSON syntax describes a sequence of Unicode code points.". Images and videos are binary formats so cannot be included directly in JSON. The standard makes no mention of how images, videos or other binary data should be included. Now some applications can find some methods of converting an image into a text format, say using base64 encoding and using it in as a string so we could have, assuming a base64 encoding

{ "imagename": "foo.jpg", "width": 100, "height": 100, "imagedata": "TWFueSBoYW5kcyBtYWtlIGxpZ2h0IHdvcmsu..." }

but this is non-standard, other applications might choose a different method, say using the data URI scheme. As images/videos are not mentioned in the standard I don't think we need to include anything about it. --Salix alba (talk): 20:00, 20 November 2021 (UTC)Reply[reply]


I have edited the Derivatives section to make it more readable, added short descriptions of each derivative, and I have added sources. But these sources are mostly primary sources, such as the official specifications. I am not sure whether there are better sources around for these rather specific subjects. Would this qualify as good enough to remove the 'more sources' template? (Besides the CUE part, that is. I have kept that bit 'as is' for now, but I would rather remove it anyway.) --MichielN (talk) 18:36, 17 June 2022 (UTC)Reply[reply]