Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

json · JSON JavaScript Object Notation

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 591
  • Category: Data Formats
  • Founded: Jul 19, 2005
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

Advanced
Messages Help
Messages 1523 - 1553 of 1955   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#1523 From: "Douglas Crockford" <douglas@...>
Date: Wed Apr 21, 2010 7:41 pm
Subject: Re: New JSON library
douglascrock...
Send Email Send Email
 
--- In json@yahoogroups.com, jonathan wallace <ninja9578@...> wrote:
> Oh, in order to get my library posted there, I've got to convert everything to
wide strings for the full range of \u utf32 characters?  Hmm, not sure if I'm
willing to do that since most users use std::string, and C has no wide string
support at all.  Oh well.


UTF-8 is another option.

#1524 From: jonathan wallace <ninja9578@...>
Date: Wed Apr 21, 2010 9:10 pm
Subject: Re: Re: New JSON library
ninja9578
Send Email Send Email
 
UTF8 doesn't support all of the characters supported by \uXXXX, four characters
mean UTF16. I do currently support UTF8, but that's only \u00XX.
  Anyway, since most users never use anything extended beyond UTF8, I am
currently working on making full support an build option, which will
automatically use wide characters and support full \u escaping.  Should finish
it up tomorrow.

:)





________________________________
From: Douglas Crockford <douglas@...>
To: json@yahoogroups.com
Sent: Wed, April 21, 2010 3:41:34 PM
Subject: [json] Re: New JSON library


--- In json@yahoogroups. com, jonathan wallace <ninja9578@. ..> wrote:
> Oh, in order to get my library posted there, I've got to convert everything to
wide strings for the full range of \u utf32 characters?  Hmm, not sure if I'm
willing to do that since most users use std::string, and C has no wide string
support at all.  Oh well.

UTF-8 is another option.







[Non-text portions of this message have been removed]

#1525 From: Chip Morningstar <chip@...>
Date: Wed Apr 21, 2010 9:17 pm
Subject: Re: Re: New JSON library
epopt
Send Email Send Email
 
That's just wrong.  See, e.g., http://en.wikipedia.org/wiki/UTF-8

Chip

jonathan wallace <ninja9578@...> wrote:

>UTF8 doesn't support all of the characters supported by \uXXXX, four characters
mean UTF16. I do currently support UTF8, but that's only \u00XX.

#1526 From: jonathan wallace <ninja9578@...>
Date: Thu Apr 22, 2010 2:32 pm
Subject: Re: Re: New JSON library
ninja9578
Send Email Send Email
 
libJSON 4.0 now fully supports \u escaped sequences if built using unicode. 
I've added project targets for the library, test suite, and embedded test suites
for these.  Unicode builds now use wstring and wchar_t strings to be able to fit
wide UTF8 characters, where regular builds still use string and chars as most
users use them.

I also made number parsing lazy for a slight speed boost. :)

http://sourceforge.net/projects/libjson/




________________________________
From: Chip Morningstar <chip@...>
To: json@yahoogroups.com
Sent: Wed, April 21, 2010 5:17:39 PM
Subject: Re: [json] Re: New JSON library


That's just wrong.  See, e.g., http://en.wikipedia.org/wiki/UTF-8

Chip

jonathan wallace <ninja9578@yahoo. com> wrote:

>UTF8 doesn't support all of the characters supported by \uXXXX, four characters
mean UTF16. I do currently support UTF8, but that's only \u00XX.






[Non-text portions of this message have been removed]

#1527 From: "Douglas Crockford" <douglas@...>
Date: Thu Apr 22, 2010 9:40 pm
Subject: Re: New JSON library
douglascrock...
Send Email Send Email
 
--- In json@yahoogroups.com, jonathan wallace <ninja9578@...> wrote:
>
> libJSON 4.0 now fully supports \u escaped sequences if built using unicode. 
I've added project targets for the library, test suite, and embedded test suites
for these.  Unicode builds now use wstring and wchar_t strings to be able to fit
wide UTF8 characters, where regular builds still use string and chars as most
users use them.
>
> I also made number parsing lazy for a slight speed boost. :)
>
> http://sourceforge.net/projects/libjson/


Does it do the right thing with "\uD834\uDD1E"? See
http://www.ietf.org/rfc/rfc4627.txt

#1528 From: "Fredag_d13" <jonas@...>
Date: Sun Apr 25, 2010 7:23 am
Subject: Railroad diagrams
Fredag_d13
Send Email Send Email
 
To Douglas Crockford

I'm writting some documentation to my JSON API and would like to add some
railroad diagrams. Can you tell me how you created the diagrams in "Javascript:
The good parts" and on json.org? I've tried to use a latex package named rails,
but the quality of the results does not match json.org.

Best regards Jonas

#1529 From: jonathan wallace <ninja9578@...>
Date: Fri Apr 23, 2010 2:15 am
Subject: Re: Re: New JSON library
ninja9578
Send Email Send Email
 
> Does it do the right thing with "\uD834\uDD1E" ? See http://www.ietf.
org/rfc/rfc4627. txt

I thought that wasn't officially part of JSON?  There is no mention of it on
json.org.  I was aware of that, but it left me confused, how would a parser know
the difference between a surrogate pair and simply two utf8 characters following
each other?

Obviously the E gives away that one, but U+64321 would be encoded as
\uD950\uDF21.





[Non-text portions of this message have been removed]

#1530 From: "Douglas Crockford" <douglas@...>
Date: Sun Apr 25, 2010 7:35 am
Subject: Re: Railroad diagrams
douglascrock...
Send Email Send Email
 
--- In json@yahoogroups.com, "Fredag_d13" <jonas@...> wrote:
> I'm writting some documentation to my JSON API and would like to add some
railroad diagrams. Can you tell me how you created the diagrams in "Javascript:
The good parts" and on json.org? I've tried to use a latex package named rails,
but the quality of the results does not match json.org.


I used Visio. The json.vsd file can be found in the Files section.
http://tech.groups.yahoo.com/group/json/files/

#1531 From: Andrea Giammarchi <andrea.giammarchi@...>
Date: Sun Apr 25, 2010 8:58 pm
Subject: PHP like __sleep, __wakeup, and Serializable interface
an_red...
Send Email Send Email
 
Any kind of thought/suggestion is welcome:

http://webreflection.blogspot.com/2010/04/json-sleep-wakeup-serialize-and.html

In few words, a way to better control serialization/de-serialization
processes using the JSON protocol we all know.
Small code, zero evaluation, namespace compatible (e.g.
serializer:"my.lib.namespace") and compatible with modules.

Regards


[Non-text portions of this message have been removed]

#1532 From: jonathan wallace <ninja9578@...>
Date: Wed May 5, 2010 5:40 pm
Subject: libJSON update
ninja9578
Send Email Send Email
 
libJSON now handles surrogate pairs correctly:
http://sourceforge.net/projects/libjson/
There is also now a makefile in the bundle for linux




________________________________
From: Douglas Crockford <douglas@...>
To: json@yahoogroups.com
Sent: Thu, April 22, 2010 5:40:32 PM
Subject: [json] Re: New JSON library



Does it do the right thing with "\uD834\uDD1E" ? See http://www.ietf.
org/rfc/rfc4627. txt




[Non-text portions of this message have been removed]

#1533 From: "Mark Joseph" <mark@...>
Date: Mon May 10, 2010 8:15 pm
Subject: XJR Offical Product Release
markjoseph_sc
Send Email Send Email
 
This is our first release of our combined JSON XML product SDK

Press Release:  https://www.p6r.com/company/news.html
Product Page:   https://www.p6r.com/software/xjr.html


Regards,

Mark Joseph, Ph.D.
President
P6R, Inc
408-205-0361
mark@...
Skype: markjoseph_sc



[Non-text portions of this message have been removed]

#1534 From: "Gary" <kaimaikid@...>
Date: Sat May 29, 2010 7:24 pm
Subject: Help needed please....
kaimaikid...
Send Email Send Email
 
Hi,
I'm new to the group as well as to using json and am wondering if someone can
write me a json script for .php webpage please?

What I need is to be able to get a json string (txt) from an url at say hourly
intervals

http://metservice.com/publicData/severeWeatherWarning

parse it and write it to a cache such as warning.txt keeping the html format in
the text.

and then have the webpage display the info from the warning.text without
hotlinking directly back to the source
when my page is opened each time, only going back to the url at the hourly
intervals to check for an update.

also for a separate webpage in php

A  script to fetch an image from a json string again at hourly intervals from

http://metservice.com/publicData/rainRadarLocL0Auckland

and

http://metservice.com/publicData/rainRadarLocL1Auckland

write both images to a folder on my site such as rainpic saving both images as
say rain0 and rain1
so that they overwrite the previous images and done so that it caches and not
hotlinking back to the original site

The displaying part is easy for me to sort here.

The reason for caching is to reduce bandwidth use on their site and not tying up
their resources as their load can
get heavy at times.

Many thanks in advance
Gary


[Non-text portions of this message have been removed]

#1535 From: jonathan wallace <ninja9578@...>
Date: Sat May 29, 2010 8:49 pm
Subject: Re: Help needed please....
ninja9578
Send Email Send Email
 
php has a built in function called json_decode.  You give it a string and it
returns you a stdClass, from there you can do whatever you want.




________________________________
From: Gary <kaimaikid@...>
To: json@yahoogroups.com
Sent: Sat, May 29, 2010 3:24:31 PM
Subject: [json] Help needed please....


Hi,
I'm new to the group as well as to using json and am wondering if someone can
write me a json script for .php webpage please?

What I need is to be able to get a json string (txt) from an url at say hourly
intervals

http://metservice.com/publicData/severeWeatherWarning

parse it and write it to a cache such as warning.txt keeping the html format in
the text.

and then have the webpage display the info from the warning.text without
hotlinking directly back to the source
when my page is opened each time, only going back to the url at the hourly
intervals to check for an update.

also for a separate webpage in php

A  script to fetch an image from a json string again at hourly intervals from

http://metservice.com/publicData/rainRadarLocL0Auckland

and

http://metservice.com/publicData/rainRadarLocL1Auckland

write both images to a folder on my site such as rainpic saving both images as
say rain0 and rain1
so that they overwrite the previous images and done so that it caches and not
hotlinking back to the original site

The displaying part is easy for me to sort here.

The reason for caching is to reduce bandwidth use on their site and not tying up
their resources as their load can
get heavy at times.

Many thanks in advance
Gary

[Non-text portions of this message have been removed]







[Non-text portions of this message have been removed]

#1536 From: Petri Lehtinen <petri@...>
Date: Sun Jun 13, 2010 6:27 pm
Subject: Jansson 1.3 released
akhern...
Send Email Send Email
 
Jansson v1.3 is out. This release adds one new encoding flag, enhances
the documentation a bit and fixes a few bugs.

Changes since v1.2.1
--------------------

* New encoding flags:

   - ``JSON_PRESERVE_ORDER``: Preserve the insertion order of object
     keys.

* Bug fixes:

   - Fix an error that occured when an array or object was first
     encoded as empty, then populated with some data, and then
     re-encoded

   - Fix the situation like above, but when the first encoding resulted
     in an error

* Documentation:

   - Clarify the documentation on reference stealing, providing an
     example usage pattern

Download source: http://www.digip.org/jansson/releases/jansson-1.3.tar.gz
View documentation: http://www.digip.org/jansson/doc/1.3/
Changelog: http://www.digip.org/jansson/doc/1.3/changes.html#version-1-3


What is Jansson?
----------------

Jansson is a C library for encoding, decoding and manipulating JSON data.
It features:

* Simple and intuitive API and data model
* Comprehensive documentation
* No dependencies on other libraries
* Full Unicode support (UTF-8)
* Extensive test suite

Jansson is licensed under the MIT license.

For more details, see http://www.digip.org/jansson/.


Petri Lehtinen
petri@...

#1537 From: jonathan wallace <ninja9578@...>
Date: Wed Jun 16, 2010 2:09 pm
Subject: new libJSON makefiles
ninja9578
Send Email Send Email
 
A lot of people have asked me for makefiles instead of the Code::Blocks project
files so I wrote makefiles for each platform.  Should be good, but didn't try to
make on Windows.  If someone has a PC, maybe try and make it to make sure that
it's correct? :)

https://sourceforge.net/projects/libjson/

Also, how do I get libJSON added to the list of libraries on
http://www.json.org/?  I asked a while ago, but libJSON wasn't complete, but
it's been fully compliant for a while.




[Non-text portions of this message have been removed]

#1538 From: Nic Volanschi <nic.volanschi@...>
Date: Wed Jun 16, 2010 6:06 pm
Subject: questions about json and pattern matching
nic.volanschi
Send Email Send Email
 
Hi,

I would like to submit a couple of questions to the members of this
group, as JSON tools designers and/or users:

1. Are you aware of any JSON codec library that implements a form of
pattern matching like this:

  var persons = json_parse(client_message);
  var subset = selectMatching(persons,
               
"{name:{firstname:%f,lastname:%l},children:[{gender:'male',born:%b}|%_]}");

where subset would end up as an array filtering the persons array and
extracting the corresponding fields, e.g.
  [{f: "John", l:"Smith", b:1991},
   {f: "Matt", l:"Johnson", b:1978}]

Or even simpler forms of matching, for one element at a time:

  var count = {de: 0, von: 0, van: 0};
  for(p in persons) {
   res = match(p, "{name:{firstname:/^(de|von|van)/}}"); // note the embedded
regex
   if(res) count[p[0]]++; // increments count.de or count.von or count.van


2. Would you find it useful to have such a matching support as a
complementary library, aside a json codec?


I'm asking these questions because I wrote a generic matching library
for JavaScript and Java (http://myPatterns.free.fr/) and I wonder if
this could help people using JSON, such as those writing Ajax
applications, for instance.

Thanks for any help/comments,
Nic.

#1539 From: "Craig Boyd" <craig@...>
Date: Wed Jun 16, 2010 9:25 pm
Subject: RE: questions about json and pattern matching
craigsboyd
Send Email Send Email
 
Not that particular syntax, but the basic idea (querying/filtering and
result set in JSON) has been around for quite some time. The latest example
I can think of would be OData from Microsoft. http://odata.org .



From: json@yahoogroups.com [mailto:json@yahoogroups.com] On Behalf Of Nic
Volanschi
Sent: Wednesday, June 16, 2010 1:07 PM
To: json@yahoogroups.com
Subject: [json] questions about json and pattern matching

Hi,

I would like to submit a couple of questions to the members of this
group, as JSON tools designers and/or users:

1. Are you aware of any JSON codec library that implements a form of
pattern matching like this:

var persons = json_parse(client_message);
var subset = selectMatching(persons,
"{name:{firstname:%f,lastname:%l},children:[{gender:'male',born:%b}|%_]}");

where subset would end up as an array filtering the persons array and
extracting the corresponding fields, e.g.
[{f: "John", l:"Smith", b:1991},
{f: "Matt", l:"Johnson", b:1978}]

Or even simpler forms of matching, for one element at a time:

var count = {de: 0, von: 0, van: 0};
for(p in persons) {
res = match(p, "{name:{firstname:/^(de|von|van)/}}"); // note the embedded
regex
if(res) count[p[0]]++; // increments count.de or count.von or count.van

2. Would you find it useful to have such a matching support as a
complementary library, aside a json codec?

I'm asking these questions because I wrote a generic matching library
for JavaScript and Java (http://myPatterns.free.fr/) and I wonder if
this could help people using JSON, such as those writing Ajax
applications, for instance.

Thanks for any help/comments,
Nic.





[Non-text portions of this message have been removed]

#1540 From: Nic Volanschi <nic.volanschi@...>
Date: Tue Jun 22, 2010 9:42 pm
Subject: RE: questions about json and pattern matching
nic.volanschi
Send Email Send Email
 
Hi Craig,

Thanks for this pointer, interesting stuff (I never heard about OData
before).

Nic.

On Wed, 2010-06-16 at 16:25 -0500, Craig Boyd wrote:
>
> Not that particular syntax, but the basic idea (querying/filtering and
> result set in JSON) has been around for quite some time. The latest
> example
> I can think of would be OData from Microsoft. http://odata.org .
>
> From: json@yahoogroups.com [mailto:json@yahoogroups.com] On Behalf Of
> Nic
> Volanschi
> Sent: Wednesday, June 16, 2010 1:07 PM
> To: json@yahoogroups.com
> Subject: [json] questions about json and pattern matching
>
> Hi,
>
> I would like to submit a couple of questions to the members of this
> group, as JSON tools designers and/or users:
>
> 1. Are you aware of any JSON codec library that implements a form of
> pattern matching like this:
>
> var persons = json_parse(client_message);
> var subset = selectMatching(persons,
> "{name:{firstname:%f,lastname:%l},children:[{gender:'male',born:%b}|%
> _]}");
>
> where subset would end up as an array filtering the persons array and
> extracting the corresponding fields, e.g.
> [{f: "John", l:"Smith", b:1991},
> {f: "Matt", l:"Johnson", b:1978}]
>
> Or even simpler forms of matching, for one element at a time:
>
> var count = {de: 0, von: 0, van: 0};
> for(p in persons) {
> res = match(p, "{name:{firstname:/^(de|von|van)/}}"); // note the
> embedded
> regex
> if(res) count[p[0]]++; // increments count.de or count.von or
> count.van
>
> 2. Would you find it useful to have such a matching support as a
> complementary library, aside a json codec?
>
> I'm asking these questions because I wrote a generic matching library
> for JavaScript and Java (http://myPatterns.free.fr/) and I wonder if
> this could help people using JSON, such as those writing Ajax
> applications, for instance.
>
> Thanks for any help/comments,
> Nic.
>
> [Non-text portions of this message have been removed]
>
>
>
>
>

#1541 From: "the_old_chief" <energeticpixels@...>
Date: Fri Jun 25, 2010 9:23 pm
Subject: Sanity Check - New to JSON
the_old_chief
Send Email Send Email
 
I am a eLearning Application developer who is working on his first experience
with JSON.  My application has no active server (php, asp, java, etc) to work
with.  So my json data must be hand-coded.  JSON data is being rendered on the
client side within a grid (jqGrid).  A 'clicked' row is sending data into
respective tabbed type windows for further user analysis.  I am needing a quick
sanity check of my JSON structure.  Am I on the right track?? Or am I barking up
the wrong tree?? I have temporarily placed a copy of my data (38cal.json) in the
files section of this group.
Here is the premise to the structure.
- root node is smallArms.  I have other files that will have roots of bombs,
chemical, fuses, etc.
- within smallArms, I have two sub-divisions of bullets and shotgun. (shotgun
portion not displayed).
- Bullets are broken down into DODICs - military way of identifying a bullet. 
There could be several dodics listed under 'bullets'.  Such as A415 is still a
cartridge for US guard or security use in 38 caliber pistols - no matter who is
the maker of the cartridge.  But there could be other dodics that are related to
38 caliber bullets (depending on the construction of that munition (jacketed,
non-jacketed, training round, etc), which would be listed below this dodic.
-  Within that DODIC are the munition particulars such as size, weight, chamber
pressure, supply information, pictures, animations, etc.


I have taken a look at the documentation on json.org as to structure.  I am
still a little lost on when to use a object and when to use an array.  I thought
I would take a crack at it and allow people to tell me I am way off base or that
I am close.

respectfully,
Tony

#1542 From: jonathan wallace <ninja9578@...>
Date: Sat Jun 26, 2010 5:13 pm
Subject: Re: Sanity Check - New to JSON
ninja9578
Send Email Send Email
 
Think of it like C++, that should help you figure out when to use an object and
when to use an array.  Basically, an array is a set of items that are the same
object type.

Object length shouldn't be an array, it should just be an object, most of those
things should just be object.  If you're programming using an object oriented
language, mapping to json should be very straightforward.  Arrays or vectors or
such should translate into arrays in json, where as object should just be
object.




________________________________
From: the_old_chief <energeticpixels@...>
To: json@yahoogroups.com
Sent: Fri, June 25, 2010 5:23:00 PM
Subject: [json] Sanity Check - New to JSON


I am a eLearning Application developer who is working on his first experience
with JSON.  My application has no active server (php, asp, java, etc) to work
with.  So my json data must be hand-coded.  JSON data is being rendered on the
client side within a grid (jqGrid).  A 'clicked' row is sending data into
respective tabbed type windows for further user analysis.  I am needing a quick
sanity check of my JSON structure.  Am I on the right track?? Or am I barking up
the wrong tree?? I have temporarily placed a copy of my data (38cal.json) in the
files section of this group.
Here is the premise to the structure.
- root node is smallArms.  I have other files that will have roots of bombs,
chemical, fuses, etc.
- within smallArms, I have two sub-divisions of bullets and shotgun. (shotgun
portion not displayed).
- Bullets are broken down into DODICs - military way of identifying a bullet. 
There could be several dodics listed under 'bullets'.  Such as A415 is still a
cartridge for US guard or security use in 38 caliber pistols - no matter who is
the maker of the cartridge.  But there could be other dodics that are related to
38 caliber bullets (depending on the construction of that munition (jacketed,
non-jacketed, training round, etc), which would be listed below this dodic.
-  Within that DODIC are the munition particulars such as size, weight, chamber
pressure, supply information, pictures, animations, etc.

I have taken a look at the documentation on json.org as to structure.  I am
still a little lost on when to use a object and when to use an array.  I thought
I would take a crack at it and allow people to tell me I am way off base or that
I am close.

respectfully,
Tony







[Non-text portions of this message have been removed]

#1543 From: John Cowan <cowan@...>
Date: Sat Jun 26, 2010 5:26 pm
Subject: Re: Sanity Check - New to JSON
johnwcowan
Send Email Send Email
 
jonathan wallace scripsit:

> Think of it like C++, that should help you figure out when to use
> an object and when to use an array.  Basically, an array is a set of
> items that are the same object type.

That's overly restrictive for JSON, whose aggregates are modeled on
JavaScript.  An array can be seen either as a sequence of data items
(same type or different types, it makes no difference) or as an object
(key-value mapping) where the keys are integers from 0 to n - 1.

--
Winter:  MIT,                                   John Cowan
Keio, INRIA,                                    cowan@...
Issue lots of Drafts.                           http://www.ccil.org/~cowan
So much more to understand!
Might simplicity return?                        (A "tanka", or extended haiku)

#1544 From: jonathan wallace <ninja9578@...>
Date: Sat Jun 26, 2010 5:38 pm
Subject: Re: Sanity Check - New to JSON
ninja9578
Send Email Send Email
 
I didn't say it was like C++, I just recommended visualizing it that way to help
simplify the json that the user had posted.  There were many places where
objects should have been used instead of arrays.  Yes, arrays in json are more
like a JS array or a multimap.




________________________________
From: John Cowan <cowan@...>
To: json@yahoogroups.com
Sent: Sat, June 26, 2010 1:26:53 PM
Subject: Re: [json] Sanity Check - New to JSON


jonathan wallace scripsit:

> Think of it like C++, that should help you figure out when to use
> an object and when to use an array.  Basically, an array is a set of
> items that are the same object type.

That's overly restrictive for JSON, whose aggregates are modeled on
JavaScript.  An array can be seen either as a sequence of data items
(same type or different types, it makes no difference) or as an object
(key-value mapping) where the keys are integers from 0 to n - 1.

--
Winter:  MIT,                                   John Cowan
Keio, INRIA, cowan@...
Issue lots of Drafts. http://www.ccil.org/~cowan
So much more to understand!
Might simplicity return?                        (A "tanka", or extended haiku)






[Non-text portions of this message have been removed]

#1545 From: Jonathan Wallace <ninja9578@...>
Date: Tue Aug 10, 2010 1:02 am
Subject: Feedback on non-standard json
ninja9578
Send Email Send Email
 
I'm redoing big parts of libjson and I'm going to extend it to use non-standard
json (as a compile option, not standard) and I'm curious if anyone foresee any
problems with what I'm thinking:

{
    "binary" : <7>7 bytes,
    "binary array" : [
       <5>ABCDE,
       <2>AB,
       <3>ABC
    ],
    "name with : colon" : {
       "subitem" : 2
    },
    "reference to array" : &binary array:2&,
    "reference" : &name with \: colon:subitem&
}

In my time using json the only reasons I've ever had to used XML is when I need
to use references or binary data, but I hate xmls complexity, so I want to
extend libjson to be able to do that.

Sent from my iPhone

#1546 From: Tatu Saloranta <tsaloranta@...>
Date: Tue Aug 10, 2010 2:48 am
Subject: Re: Feedback on non-standard json
cowtowncoder
Send Email Send Email
 
On Mon, Aug 9, 2010 at 6:02 PM, Jonathan Wallace <ninja9578@...> wrote:
> I'm redoing big parts of libjson and I'm going to extend it to use
non-standard json (as a compile option, not standard) and I'm curious if anyone
foresee any problems with what I'm thinking:
>
> {
>   "binary" : <7>7 bytes,
>   "binary array" : [
>      <5>ABCDE,
>      <2>AB,
>      <3>ABC
>   ],
>   "name with : colon" : {
>      "subitem" : 2
>   },
>   "reference to array" : &binary array:2&,
>   "reference" : &name with \: colon:subitem&
> }
>
> In my time using json the only reasons I've ever had to used XML is when I
need to use references or binary data, but I hate xmls complexity, so I want to
extend libjson to be able to do that.

XML does not have native binary data either; usually base64 encoding
is used, and same works well for JSON. Why not use that? Or given that
content is just Unicode there is nothing preventing you from just
using regular text, limiting to codepoints 0 through 255.
And references are typically these are done at layer above JSON, using
naming conventions or schema (implicit or explicit) to indicate where
a reference is expected. XML has no native notation for these either
(unless perhaps general entity references). They are built using
layers above.

So I am not quite sure why you would want to break syntax-level
compatibility to do things that can be done at layer(s) directly above
JSON.

-+ Tatu +-

#1547 From: Jonathan Wallace <ninja9578@...>
Date: Tue Aug 10, 2010 3:03 pm
Subject: Re: Feedback on non-standard json
ninja9578
Send Email Send Email
 
Thanks for your input. I guess I never looks at how my XML library handled the
binary.  I guess I'll just add a method to insert binary data that automatically
converts it to base64

Sent from my iPhone

On Aug 9, 2010, at 22:48, Tatu Saloranta <tsaloranta@...> wrote:

> On Mon, Aug 9, 2010 at 6:02 PM, Jonathan Wallace <ninja9578@...> wrote:
> > I'm redoing big parts of libjson and I'm going to extend it to use
non-standard json (as a compile option, not standard) and I'm curious if anyone
foresee any problems with what I'm thinking:
> >
> > {
> >   "binary" : <7>7 bytes,
> >   "binary array" : [
> >      <5>ABCDE,
> >      <2>AB,
> >      <3>ABC
> >   ],
> >   "name with : colon" : {
> >      "subitem" : 2
> >   },
> >   "reference to array" : &binary array:2&,
> >   "reference" : &name with \: colon:subitem&
> > }
> >
> > In my time using json the only reasons I've ever had to used XML is when I
need to use references or binary data, but I hate xmls complexity, so I want to
extend libjson to be able to do that.
>
> XML does not have native binary data either; usually base64 encoding
> is used, and same works well for JSON. Why not use that? Or given that
> content is just Unicode there is nothing preventing you from just
> using regular text, limiting to codepoints 0 through 255.
> And references are typically these are done at layer above JSON, using
> naming conventions or schema (implicit or explicit) to indicate where
> a reference is expected. XML has no native notation for these either
> (unless perhaps general entity references). They are built using
> layers above.
>
> So I am not quite sure why you would want to break syntax-level
> compatibility to do things that can be done at layer(s) directly above
> JSON.
>
> -+ Tatu +-
>


[Non-text portions of this message have been removed]

#1548 From: Tatu Saloranta <tsaloranta@...>
Date: Tue Aug 10, 2010 5:43 pm
Subject: Re: Feedback on non-standard json
cowtowncoder
Send Email Send Email
 
On Tue, Aug 10, 2010 at 8:03 AM, Jonathan Wallace <ninja9578@...> wrote:
> Thanks for your input. I guess I never looks at how my XML library handled the
binary.

Ah ok. :)

>  I guess I'll just add a method to insert binary data that automatically
converts it to base64

Yeah that is one way. Actually there is another, used with HTTP -- you
can send binary as separate http body part, refer to that from XML (I
think that's MTOM?).
Same could be done with JSON as well.

Good luck!

-+ Tatu +-

#1550 From: "Douglas Crockford" <douglas@...>
Date: Mon Aug 30, 2010 10:07 pm
Subject: Silicon Valley Codecamp, October 9th and 10th, 2010
douglascrock...
Send Email Send Email
 
JSON.org is a sponsor this year of Silicon Valley Codecamp, a free conference
held at Foothill College in Los Altos, CA. I hope to see you there.

For more information, please visit:  http://www.siliconvalley-codecamp.com/

#1551 From: jonathan wallace <ninja9578@...>
Date: Sun Sep 12, 2010 8:55 pm
Subject: libjson 6
ninja9578
Send Email Send Email
 
If anyone here uses libjson, I just released libjson 6.  Be aware though, this
one will not just plug into your code if you are using an old version.  Both
it's C and C++ interfaces are different.  The C one is now more C like and the
C++ one is more STL like.  There is extensive documentation in the download.

New features include:
Reference Counting
Thread Safety Tools
Memory Management Tools
Comments are kept when parsing
Base64 encoding/decoding
More customizable writer

And these are all compile options, so if you don't need them, they aren't
compiled, this cuts down on space.




[Non-text portions of this message have been removed]

#1552 From: "Douglas Crockford" <douglas@...>
Date: Wed Oct 6, 2010 5:54 am
Subject: Talk with Crock
douglascrock...
Send Email Send Email
 
I will be doing a session at Silicon Valley Codecamp at Foothill College in Los
Altos, California on Saturday, October 9 at 11:15am. I will be talking about
JSON and other things. Registration is free.

http://www.siliconvalley-codecamp.com/

#1553 From: "Mark Joseph" <mark@...>
Date: Mon Oct 11, 2010 6:06 pm
Subject: New Product that supports JsonML, JSON, XML, and XPath 2.0
markjoseph_sc
Send Email Send Email
 
JDXâ„¢ XPath 2.0 for XML, JSON and JsonML

https://www.p6r.com/software/jdx.html#


Regards,

Mark Joseph, Ph.D.
President
P6R, Inc
408-205-0361
mark@...
Skype: markjoseph_sc
   _____

From: Douglas Crockford [mailto:douglas@...]
To: json@yahoogroups.com
Sent: Thu, 22 Apr 2010 14:40:32 -0700
Subject: [json] Re: New JSON library






--- In json@yahoogroups.com, jonathan wallace <ninja9578@...> wrote:
   >
   > libJSON 4.0 now fully supports \u escaped sequences if built using unicode. 
I've added project targets for the library, test suite, and embedded test suites
for these.  Unicode builds now use wstring and wchar_t strings to be able to fit
wide UTF8 characters, where regular builds still use string and chars as most
users use them.
   >
   > I also made number parsing lazy for a slight speed boost. :)
   >
   > http://sourceforge.net/projects/libjson/

   Does it do the right thing with "\uD834\uDD1E"? See
http://www.ietf.org/rfc/rfc4627.txt




[Non-text portions of this message have been removed]

Messages 1523 - 1553 of 1955   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help