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: 590
  • Category: Data Formats
  • Founded: Jul 19, 2005
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

Advanced
Messages Help
Messages 829 - 858 of 1958   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#829 From: "Douglas Crockford" <douglas@...>
Date: Tue Jul 3, 2007 4:10 am
Subject: json-pt
douglascrock...
Send Email Send Email
 
The JSON.org page is now available in Portuguese.

http://json.org/json-pt.html

#830 From: "rui.maciel" <rui.maciel@...>
Date: Tue Jul 3, 2007 9:18 pm
Subject: MJSON v0.4 released
rui.maciel
Send Email Send Email
 
I'm proud to announce that MJSON v0.4 has been released!

MJSON is Maciel's JSON parser, a small light-weight library that
handles documents written in the JSON markup language. It's written in
ISO C, which means that it may run wherever there is a C compiler.

It's still in alpha stage but at the moment it is capable of parsing
every JSON example present in www.json.org.

This new release features, along with some bug fixes, a new SAX-like
parser - json_saxy_parser() -  which allows to handle JSON documents
sequentially. In order to showcase the new parser, a small test
application, jsonindent, was also released. jsonindent is a small JSON
pretty printer written completely in ISO C and relying on MJSON's
json_saxy_parser() to format JSON documents.


MJSON and jsonindent can be found at:
http://sourceforge.net/projects/mjson


Rui Maciel

#831 From: "jthomaspfrank" <thomas@...>
Date: Fri Jul 6, 2007 9:48 pm
Subject: New JSON editor
jthomaspfrank
Send Email Send Email
 
I've just posted a new JSON editor that let's you view and edit JSOn
from a tree view here:

http://www.thomasfrank.se/json_editor.html

I hope it might be of use for some of you.

/Thomas

#832 From: "rkmr.em@..." <rkmr.em@...>
Date: Tue Jul 10, 2007 5:52 pm
Subject: json date time objects
cosmic_civilian
Send Email Send Email
 
Does JSON support a datetime object?

thanks


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

#833 From: "brucehub33" <bruce.hubbard33@...>
Date: Wed Jul 11, 2007 11:32 pm
Subject: Re: json date time objects
brucehub33
Send Email Send Email
 
--- In json@yahoogroups.com, "rkmr.em@..." <rkmr.em@...> wrote:
>
> Does JSON support a datetime object?
>
> thanks
>
>
> [Non-text portions of this message have been removed]
>
you can put whole functions in a json object if you like. So in short
yes just make a new Date() object within you JSON object.

#834 From: "S.Prasannarupan" <prasannarupan@...>
Date: Thu Jul 12, 2007 5:10 am
Subject: Re: json date time objects
prasannarupan
Send Email Send Email
 
Does this mean that Date objects created using new Date() can be
directly mapped to Java Objects? Can the date object created this way
be formatted into different date time formats?
please let me know
Thanks


--- In json@yahoogroups.com, "brucehub33" <bruce.hubbard33@...> wrote:
>
> --- In json@yahoogroups.com, "rkmr.em@" <rkmr.em@> wrote:
> >
> > Does JSON support a datetime object?
> >
> > thanks
> >
> >
> > [Non-text portions of this message have been removed]
> >
> you can put whole functions in a json object if you like. So in
short
> yes just make a new Date() object within you JSON object.
>

#835 From: Mert Sakarya <mertsakarya@...>
Date: Thu Jul 12, 2007 5:19 am
Subject: RE: Re: json date time objects
mertsakarya
Send Email Send Email
 
Hi,

JSON does not support either datetime object or function object. Look at BNF on
http://www.json.org/ how "value" is defined.
It contains, ["string", "number", "object", "array", "true", "false", "null"].
On this definition "object" is a JSON object (where you can find the definition
above "value"), not a Javascript object.

Although you can freely add something like new Date(2007, 7, 12, 0, 0, 0) or
function(x,y) {return x+y;}, this makes that document a Javascript document
(where you can eval), not JSON document.

Mert



To: json@...: bruce.hubbard33@...: Wed, 11 Jul 2007
23:32:28 +0000Subject: [json] Re: json date time objects




--- In json@yahoogroups.com, "rkmr.em@..." <rkmr.em@...> wrote:>> Does JSON
support a datetime object?> > thanks> > > [Non-text portions of this message
have been removed]>you can put whole functions in a json object if you like. So
in short yes just make a new Date() object within you JSON object.


_________________________________________________________________
Missed the show?  Watch videos of the Live Earth Concert on MSN.
http://liveearth.msn.com

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

#836 From: Mert Sakarya <mertsakarya@...>
Date: Thu Jul 12, 2007 5:22 am
Subject: RE: Re: json date time objects
mertsakarya
Send Email Send Email
 
You can write any date data as a string in a JSON document, then if you are
using Java, C# or Javascript (or any other), you can use that language's,
DateTime functions to convert.


To: json@...: prasannarupan@...: Thu, 12 Jul 2007
05:10:15 +0000Subject: [json] Re: json date time objects




Does this mean that Date objects created using new Date() can be directly mapped
to Java Objects? Can the date object created this way be formatted into
different date time formats?please let me knowThanks--- In json@yahoogroups.com,
"brucehub33" <bruce.hubbard33@...> wrote:>> --- In json@yahoogroups.com,
"rkmr.em@" <rkmr.em@> wrote:> >> > Does JSON support a datetime object?> > > >
thanks> > > > > > [Non-text portions of this message have been removed]> >> you
can put whole functions in a json object if you like. So in short > yes just
make a new Date() object within you JSON object.>


_________________________________________________________________
Don't get caught with egg on your face. Play Chicktionary!  
http://club.live.com/chicktionary.aspx?icid=chick_wlmailtextlink

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

#837 From: "Stephen M. McKamey" <jsonml@...>
Date: Thu Jul 12, 2007 1:51 pm
Subject: Re: json date time objects
stephen.mckamey
Send Email Send Email
 
Basically Dates are encoded as ISO 8601 strings by default (but this
can be customized), and a "hook" or callback function allows you to
deserialize them (or any other node for that matter) during parseJSON.

Functions are strictly not allowed in JSON as they are potentially
meaningless to other languages as well as a potential security risks.

There has also be some debates about Dates a couple of times before,
which resulted in the above solution. Check out some of these threads
for more info:

http://tech.groups.yahoo.com/group/json/message/600
http://tech.groups.yahoo.com/group/json/message/607
http://tech.groups.yahoo.com/group/json/message/554
http://tech.groups.yahoo.com/group/json/message/518

--- In json@yahoogroups.com, Mert Sakarya <mertsakarya@...> wrote:
>
> You can write any date data as a string in a JSON document, then if
you are using Java, C# or Javascript (or any other), you can use that
language's, DateTime functions to convert.
>
>
> To: json@...: prasannarupan@...: Thu, 12 Jul 2007 05:10:15
+0000Subject: [json] Re: json date time objects
>
>
>
>
> Does this mean that Date objects created using new Date() can be
directly mapped to Java Objects? Can the date object created this way
be formatted into different date time formats?please let me
knowThanks--- In json@yahoogroups.com, "brucehub33"
<bruce.hubbard33@> wrote:>> --- In json@yahoogroups.com, "rkmr.em@"
<rkmr.em@> wrote:> >> > Does JSON support a datetime object?> > > >
thanks> > > > > > [Non-text portions of this message have been
removed]> >> you can put whole functions in a json object if you
like. So in short > yes just make a new Date() object within you JSON
object.>
>
>
> _________________________________________________________________
> Don't get caught with egg on your face. Play Chicktionary!  
> http://club.live.com/chicktionary.aspx?icid=chick_wlmailtextlink
>
> [Non-text portions of this message have been removed]
>

#838 From: "Douglas Crockford" <douglas@...>
Date: Fri Jul 20, 2007 3:46 pm
Subject: json.js
douglascrock...
Send Email Send Email
 
The json.js reference implementation now produces date strings in the
ISO Z format, in anticipation of the addition of
Date.prototype.toISOString to ECMAScript.

http://www.JSON.org/json.js

#839 From: "ericazhangjun" <ericazhangjun@...>
Date: Wed Aug 1, 2007 3:41 pm
Subject: How to remove the script dynamically added ?
ericazhangjun
Send Email Send Email
 
Hi,
Now I built some mashup using JSON. Sometimes, I want to block the
script to be executed. I want to remove the script dynamically added
to prevent it from execution. Is there some way for me to do this ?

Or, if you  have other idea to implement this function, coul d you
share it with me ?

Thanks a lot.

#840 From: "Douglas Crockford" <douglas@...>
Date: Sun Aug 5, 2007 8:25 pm
Subject: json.js
douglascrock...
Send Email Send Email
 
I changed the way that json.js calls the hasOwnProperty method. A
design flaw in JavaScript causes hasOwnProperty to fail when an object
contains a property called "hasOwnProperty".

http://json.org/json.js

#841 From: "rui.maciel" <rui.maciel@...>
Date: Wed Aug 8, 2007 4:35 pm
Subject: MJSON v0.5 released
rui.maciel
Send Email Send Email
 
I'm proud to announce that MJSON v0.5 has been released!

MJSON is Maciel's JSON parser, a small light-weight library that
handles documents written in the JSON markup language. It's written in
ISO C, which means that it may run wherever there is a C compiler.

This new release is mainly a cleanup release to mark the begining of
the library's beta stage.

MJSON can be found at:
http://sourceforge.net/projects/mjson


Rui Maciel

#842 From: "genzoeri" <genzoeri@...>
Date: Wed Aug 15, 2007 1:48 am
Subject: [question] parse json with ajax
genzoeri
Send Email Send Email
 
Hi,I have difficulties to parse this json
{depth1:{depth2:{depth3:'content'}}}
how to get the 'content'?? using ajax?

#843 From: Crzy4C <Crzy4c@...>
Date: Wed Aug 15, 2007 2:04 am
Subject: Re: [question] parse json with ajax
crzy4c
Send Email Send Email
 
well you don't get "content" using ajax. You get "content" using
javascript...
if that json string was assigned to a variable foo...
var foo = {depth1 : { depth2 : {depth3 : 'content'}}};
and you set...
var foo1 = foo.depth1.depth2.depth3;
then the value of foo1 would be 'content;

Mike

genzoeri wrote:
>
> Hi,I have difficulties to parse this json
> {depth1:{depth2:{depth3:'content'}}}
> how to get the 'content'?? using ajax?
>
>



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

#844 From: "Martin Cooper" <mfncooper@...>
Date: Wed Aug 15, 2007 2:11 am
Subject: Re: [question] parse json with ajax
mfncooper
Send Email Send Email
 
On 8/14/07, genzoeri <genzoeri@...> wrote:
>
> Hi,I have difficulties to parse this json
> {depth1:{depth2:{depth3:'content'}}}


That's not valid JSON, for two reasons:

1) Key names are strings, and must be quoted as such.
2) Strings must be quoted with double quotes, not single quotes.

See http://json.org/ for the JSON specification.

--
Martin Cooper


how to get the 'content'?? using ajax?
>
>
>
>
> Yahoo! Groups Links
>
>
>
>


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

#845 From: "genzoeri" <genzoeri@...>
Date: Wed Aug 15, 2007 6:34 am
Subject: Re: [question] parse json with ajax
genzoeri
Send Email Send Email
 
I will use this for my AJAX. Using responsetext properties from XHR.
:) ok,then how to parse, {"depth1":{"depth2":{"depth3":"content"}}} ??
btw, thank you for your response. I am glad, I am on the right place.
--- In json@yahoogroups.com, "Martin Cooper" <mfncooper@...> wrote:
>
> On 8/14/07, genzoeri <genzoeri@...> wrote:
> >
> > Hi,I have difficulties to parse this json
> > {depth1:{depth2:{depth3:'content'}}}
>
>
> That's not valid JSON, for two reasons:
>
> 1) Key names are strings, and must be quoted as such.
> 2) Strings must be quoted with double quotes, not single quotes.
>
> See http://json.org/ for the JSON specification.
>
> --
> Martin Cooper
>
>
> how to get the 'content'?? using ajax?
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>

#846 From: Mark Ireland <markincuba@...>
Date: Wed Aug 15, 2007 6:58 am
Subject: RE: [question] parse json with ajax
akaidr4vr
Send Email Send Email
 
Key names must be quoted and cant start with a number?Is that right?To:
json@...: mfncooper@...: Tue, 14 Aug 2007 19:11:32
-0700Subject: Re: [json] [question] parse json with ajax


















             On 8/14/07, genzoeri <genzoeri@...> wrote:
>
> Hi,I have difficulties to parse this json
> {depth1:{depth2:{depth3:'content'}}}

That's not valid JSON, for two reasons:

1) Key names are strings, and must be quoted as such.
2) Strings must be quoted with double quotes, not single quotes.

See http://json.org/ for the JSON specification.

--
Martin Cooper

how to get the 'content'?? using ajax?
>
>
>
>
> Yahoo! Groups Links
>
>
>
>

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
















_________________________________________________________________
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE

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

#847 From: Michal Migurski <mike-jsonphp@...>
Date: Wed Aug 15, 2007 8:09 am
Subject: Re: Re: [question] parse json with ajax
michal_migurski
Send Email Send Email
 
On Aug 14, 2007, at 11:34 PM, genzoeri wrote:
> I will use this for my AJAX. Using responsetext properties from XHR.
> :) ok,then how to parse, {"depth1":{"depth2":{"depth3":"content"}}} ??
> btw, thank you for your response. I am glad, I am on the right place.

This should help:
	 eval("var responsejson = (" + responsetext + ");");
	 alert(responsejson['depth1']['depth2']['depth3'];



On Aug 14, 2007, at 11:58 PM, Mark Ireland wrote:
> Key names must be quoted and cant start with a number?Is that right?

Yes.

-mike.

----------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca            http://mike.teczno.com/contact.html

#848 From: "Philip Tellis" <philip.tellis@...>
Date: Thu Aug 16, 2007 5:05 am
Subject: Re: Re: [question] parse json with ajax
philiptellis
Send Email Send Email
 
On 15/08/07, Michal Migurski <mike-jsonphp@...> wrote:
>
>  This should help:
>   eval("var responsejson = (" + responsetext + ");");
>   alert(responsejson['depth1']['depth2']['depth3'];

Ugh, don't do that.  Apart from screwing with the scope of
responsejson, it also causes a security problem, and it's overkill.
If you must use eval, do it this way:

var responsejson = eval( "(" + o.responseText + ")" );

That won't take away the security problems with eval, but it will make
sure that responsejson is in current scope.

#849 From: "Shorthouse, David" <dps1@...>
Date: Sun Aug 19, 2007 2:26 am
Subject: multiple, identical callbacks
davidpshorth...
Send Email Send Email
 
Hello folks,



First, I'm relatively new to working with JSON so please bear with me.
Here's the situation:



I am attempting to use multiple callbacks all from the same provider, but of
course, overlapped onclick events steal each other's scopes.the removeChild
function wouldn't have yet had a chance to complete before the next onclick
event initiates so it "steals" the contents of the callback function.



To make sense of what I am talking about, imagine using many JSON Flickr
callbacks in rapid succession with the hopes of having the outputs appear in
different divisions on one page. To see what I am talking about, have a peek
at a development page I am working on & attempt to click the search icons
beside references by Archer between 1950 & 1958 in rapid succession on
http://canadianarachnology.dyndns.org/data/canada_spiders/AllReferences2.asp
. Note that the JSON provider (not Flickr of course) is still working on his
JSON-generating function, so please stick to those references to fire the
onclick call.other onclicks to call the provider may return XML instead of
JSON. Note also that the above URL will return a 404 once I figure out how
best to do this. I guess what I'm after is a method to alert the user to
wait for a callback to complete before he/she attempts to initiate a second
one because the removeChild wouldn't have yet had a chance to clear the
callback function from their browser page's head section. Is this at all
possible?



Any help would be most appreciated,



David P. Shorthouse

------------------------------------------------------

Department of Biological Sciences

CW-403, Biological Sciences Centre

University of Alberta

Edmonton, AB   T6G 2E9

http://canadianarachnology.webhop.net

http://arachnidforum.webhop.net

http://www.spiderwebwatch.org <http://www.spiderwebwatch.org/>
------------------------------------------------------





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

#850 From: "Douglas Crockford" <douglas@...>
Date: Sun Aug 19, 2007 2:58 pm
Subject: json.js
douglascrock...
Send Email Send Email
 
The toJSONString methods can now take an optional whitelist parameter,
an array of strings. It is used to select the properties that will be
included in the JSON text.

http://www.json.org/json.js

#851 From: "Douglas Crockford" <douglas@...>
Date: Sat Aug 25, 2007 10:40 am
Subject: json-nl
douglascrock...
Send Email Send Email
 
The JSON.org page is now available in Dutch.

http://json.org/json-nl.html

#852 From: "mahesh_mission" <mahesh_mission@...>
Date: Sun Aug 26, 2007 12:59 pm
Subject: Comparing the metadata field with a variable passed
mahesh_mission
Send Email Send Email
 
Hi,

I have a JSON object which has a strcture like this :

{ "MainData":
	 {

		 "Company":
			 {
			 "Name":"ABC Ltd",
			 "Address":"<address>"
			 },
		 "Data":
			 {
				 "001":
				 {
					 "Name": "Test",
					 "Age":"45"
				 },
				 "002":
				 {
					 "Name" : "Sample",
					 "Age":"35"
				 }
			 }
		 }
}

In this, "001", "002" are emloyee numbers.
Now assume the employee number is passed from an another function as
an input. (Let it be EmpNo)

Now, I need to check if the passed in employee number is present in
the JSON structure and accordingly retreive the data.

I need to use the javascript for this.
If I try to say

	 MainData.Company.Data.eval(EmpNo);

this works fine if the EmpNo is 001 or 002.
But if the EmpNo is 135, which is not present in the JSON output, it
throws an error.

How I can check that the input EmpNo is present in the JSON
structure.(This needs to be done in javascript)
Any help would be greatly appreciated.

Thanks in advance for the answer.

#853 From: "Philip Tellis" <philip.tellis@...>
Date: Sun Aug 26, 2007 4:14 pm
Subject: Fwd: Comparing the metadata field with a variable passed
philiptellis
Send Email Send Email
 
On 26/08/07, mahesh_mission <mahesh_mission@...> wrote:
>
>  I have a JSON object which has a strcture like this :
>
>  { "MainData":
>       {
>
>               "Company":
>                       {
>                       "Name":"ABC Ltd",
>                       "Address":"<address>"
>                       },
>               "Data":
>                       {
>                               "001":
>                               {
>                                       "Name": "Test",
>                                       "Age":"45"
>                               },
>                               "002":
>                               {
>                                       "Name" : "Sample",
>                                       "Age":"35"
>                               }
>                       }
>               }
>  }
>
>  In this, "001", "002" are emloyee numbers.
>  Now assume the employee number is passed from an another function as
>  an input. (Let it be EmpNo)
>
>  Now, I need to check if the passed in employee number is present in
>  the JSON structure and accordingly retreive the data.
>
>  I need to use the javascript for this.
>  If I try to say
>
>       MainData.Company.Data.eval(EmpNo);

avoid using eval.  Just use the "in" operator"

if(EmpNo in MainData.Company.Data)

in checks for the existence of a key.


--
hello world

#854 From: "mahesh_mission" <mahesh_mission@...>
Date: Sun Aug 26, 2007 5:25 pm
Subject: Re: Fwd: Comparing the metadata field with a variable passed
mahesh_mission
Send Email Send Email
 
Hi,

It works fine now.
Thanks a lot for your timely help!!

--- In json@yahoogroups.com, "Philip Tellis" <philip.tellis@...>
wrote:
>
> On 26/08/07, mahesh_mission <mahesh_mission@...> wrote:
> >
> >  I have a JSON object which has a strcture like this :
> >
> >  { "MainData":
> >       {
> >
> >               "Company":
> >                       {
> >                       "Name":"ABC Ltd",
> >                       "Address":"<address>"
> >                       },
> >               "Data":
> >                       {
> >                               "001":
> >                               {
> >                                       "Name": "Test",
> >                                       "Age":"45"
> >                               },
> >                               "002":
> >                               {
> >                                       "Name" : "Sample",
> >                                       "Age":"35"
> >                               }
> >                       }
> >               }
> >  }
> >
> >  In this, "001", "002" are emloyee numbers.
> >  Now assume the employee number is passed from an another
function as
> >  an input. (Let it be EmpNo)
> >
> >  Now, I need to check if the passed in employee number is
present in
> >  the JSON structure and accordingly retreive the data.
> >
> >  I need to use the javascript for this.
> >  If I try to say
> >
> >       MainData.Company.Data.eval(EmpNo);
>
> avoid using eval.  Just use the "in" operator"
>
> if(EmpNo in MainData.Company.Data)
>
> in checks for the existence of a key.
>
>
> --
> hello world
>

#855 From: "Douglas Crockford" <douglas@...>
Date: Tue Aug 28, 2007 1:27 am
Subject: org.json.JSONObject.java
douglascrock...
Send Email Send Email
 
New constructors for JSONObject:

     JSONObject(Object bean)

         Make a new JSONObject from the getter methods of a bean.

     JSONObject(Object object, String names[])

         Make a new JSONObject using an array of keys to extract
         values from an Object.

New constructor for JSONArray:

     JSONArray(Object array)

         Make a new JSONArray from a Java array.

The toJSONString methods will attempt to produce JSON text for values
of type array, Collection, Map.

http://www.json.org/java/index.html

#856 From: Stefan Gössner <stefan@...>
Date: Tue Aug 28, 2007 3:25 pm
Subject: JSONPath
stefangoessner
Send Email Send Email
 
In the current process to improve JSONT I implemented a lightweight
component JSONPath, which compares a lot to XPath.

You can download it for Javascript and PHP

http://code.google.com/p/jsonpath/

and read more about it.

http://goessner.net/articles/JsonPath/

Comments are welcome .. thanks.

#857 From: "wefnewtrhewlkfd9" <Andrey_CD@...>
Date: Thu Aug 30, 2007 5:18 am
Subject: JsonV
wefnewtrhewl...
Send Email Send Email
 
JSONV- open-source format, based on jsons formats, as alternative to
xml,css,xslt,rdf,owl,html presentation of information for the dynamic
forming and transmission of content .More...
<http://semanticfind.com/jsonv>  


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

#858 From: Atif Aziz <atif.aziz@...>
Date: Fri Aug 31, 2007 10:47 pm
Subject: RE: JSONPath
azizatif
Send Email Send Email
 
JSONPath looks very promising and close in spirit to the simplicity and
effectiveness of JSON. I just finished an initial port and implementation in C#
(should compile and run on just about any platform where a decent C# compiler is
available) and which can now be downloaded [1] from the same project site, i.e.
http://code.google.com/p/jsonpath/ (thanks, Stefan). Comments and feedback
appreciated.

- Atif

[1] http://jsonpath.googlecode.com/files/jsonpath-0.5.0.cs

From: json@yahoogroups.com [mailto:json@yahoogroups.com] On Behalf Of Stefan
Gössner
Sent: Tuesday, August 28, 2007 5:26 PM
To: json@yahoogroups.com
Subject: [json] JSONPath


In the current process to improve JSONT I implemented a lightweight
component JSONPath, which compares a lot to XPath.

You can download it for Javascript and PHP

http://code.google.com/p/jsonpath/

and read more about it.

http://goessner.net/articles/JsonPath/

Comments are welcome .. thanks.



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

Messages 829 - 858 of 1958   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