jayduhon / inferno-os

Automatically exported from code.google.com/p/inferno-os
2 stars 0 forks source link

proposed change to json(2) inferface (with patch) #229

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I may be wrong, but I interpret your reply at http://article.gmane.org/
gmane.os.inferno.general/2820 as consent to change json(2) interface.

Attached patch implement that change, to make json(2) more ease to use.

Proposed functions isn't strict, if possible they quietly convert data 
from any compatible JValue type to type requested by user. This is good 
because it mimics nature of dynamic languages like JavaScript/Perl which 
often produce and consume json without making any difference between 
string and numeric format for numbers, undefined/null value and empty 
string/number zero. Also, in case user will need more strict handling, he 
always can use is*() functions before fetching data.

Original issue reported on code.google.com by powerman...@gmail.com on 15 Mar 2010 at 8:43

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by Charles....@gmail.com on 20 Mar 2010 at 11:43