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...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 564 - 593 of 1953   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#564 From: "Matthew Morley" <WickedLogic@...>
Date: Wed Nov 1, 2006 11:46 am
Subject: Re: Aioxml vs Json
mpcmtechnolo...
Send Email Send Email
 
The requirement of a new line being the delimiter means there is a lot
of wasted data/space during transport that is needed for meaning, not
just human readability.

I am not sure why you posted with a "Aioxml vs Json" title, are you
looking for feed back?

--
Matthew P. C. Morley
MPCM Technologies Inc.

#565 From: "Gaetano Giunta" <giunta.gaetano@...>
Date: Thu Nov 2, 2006 4:57 pm
Subject: RE: JSON, schemas & RELAX NG
gaetanogiunt...
Send Email Send Email
 
Maybe a bit offtopic, but I have been playing with xmlrpc for a long, long time,
and the very same question popped up now and then from different people.
Unfortunately there seems to eb no golden-bullet answer:

- xml schema is a real pain in the a### to use. People who master it are most
likely not going to appreciate the simplicity of json anyway, but rather stick
with SOAP beacause of all its enterprisey frameworks, automagic
gluecode-generating kits and wide support

- relax ng is very cool, but as soon as you have implemented it, you find out
nobody else but you has a toolkit that can take advantage of it

- a json-in-json type description language would be more appealing to the json
crowd, but since it has not been written into the spec since day one, adoption
rate risks to be very low.
In XMLRPC for example, most toolkit developers support a very crude type
definition scheme, which has no provision for specificying recursive data
(arrays, objects). A second proposition for a more detailed type scheme was
made, but never adopted by anybody.

Imho the problem is every type definition language is too crude for some people
(the "I miss a way to sepecify an odd integer value between -1 and 13" syndrome)
and too complex for some other people (wsdl being a prime example - it is
extremely complex on its own, but has no provision for a lot of stuff, eg.
constraints that apply between two successive webservice calls, such as using a
valid connection ID after retrieving it from the server, and now BPEL is poised
to take opver and add even more complexity). The general trend being more bloat
gets added with time.

Just my 2c

gaetano

   -----Original Message-----
   From: json@yahoogroups.com [mailto:json@yahoogroups.com]On Behalf Of hweingram
   Sent: Tuesday, October 31, 2006 10:18 AM
   To: json@yahoogroups.com
   Subject: [json] JSON, schemas & RELAX NG


   Hi folks.

   I am new to the group.

   I am interested in defining the expected structure
   of JSON objects in a way that can be programmatically
   introspected. Such definitions could be used for
   validation and for other purposes.

   As I understand it:

   1. There is no equivalent of XML schema for JSON.

   2. Where "schema-driven" functionality has been
   implemented for JSON, it has typically followed
   one of 3 approaches:

   * XML schemas: Use schemas to describe XML, and
   map the XML to JSON algorithmically.
   * Based on RELAX NG: Claimed to be better than
   XSL for JSON scenarios. Less broadly supported,
   though.
   * Custom implementations

   3. Is this an accurate description of the current
   state of the art?

   4. Is any consensus developing in this area? What
   standard toolsets exist in this area?

   5. Closely related question: is anyone working on an
   extensible type mechanism for JSON?

   Thanks very much for your thoughts.

   hw





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

#566 From: "dawjde" <davide.rognoni@...>
Date: Fri Nov 3, 2006 9:10 pm
Subject: Re: Aioxml vs Json
dawjde
Send Email Send Email
 
This forum deletes tabs (\t)
(object
\tattrib = v
)object

--- In json@yahoogroups.com, "dawjde" <davide.rognoni@...> wrote:
>
> http://cheeseshop.python.org/pypi/Aioxml
>
> - LANGUAGE EXAMPLE
> ==================
>
> # This is an example
> (object
>  attribute = value
>  attribute2 = value2
>  (object
> 	 attribute = value
> 	 attribute2 = value2
>  )object
> )object
>
> # a is empty
> attribute a = "
> attribute b = value value
> attribute c = right spaces   "
> attribute d = " left space
> attribute e = "  both spaces "
> attribute f =
> This is a multiline attribute that ends when next line have only one
"
> on start.
> If the line have only the chars ", the parser delete one ":
> "others chars
>    "
> """
> ""
> "
>

#567 From: "Douglas Crockford" <douglas@...>
Date: Sun Nov 5, 2006 1:28 am
Subject: json.org
douglascrock...
Send Email Send Email
 
The main JSON page is available in Chinese English French German
Italian Japanese Korean, and now Spanish.

Please advise me of any corrections.

If you are fluent in a language not on the list, would you like to
contribute a translation?

#568 From: "Gustavo Muñoz" <justavo@...>
Date: Sun Nov 5, 2006 3:42 am
Subject: Re: json.org
justavo_munoz
Send Email Send Email
 
Douglas,

Please find attached an (IMO) improved Spanish version of the page. I
changed some words and constructs and modified punctuation to fit Spanish
language rules better. I am mexican, so I am fluent in Spanish.

My 0.02,

Gustavo Muñoz

--
Blog: http://justavo.blogsome.com/


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

#569 From: "Gaetano Giunta" <giunta.gaetano@...>
Date: Mon Nov 6, 2006 9:13 am
Subject: RE: json.org
gaetanogiunt...
Send Email Send Email
 
Here's some small improvements to the italian version

Bye
Gaetano

JSON (JavaScript Object Notation) è un semplice formato per lo scambio di dati.
Per le persone è facile da leggere e scrivere, mentre per le macchine risulta
facile da generare e analizzarne la sintassi. Si basa su un sottoinsieme del
Linguaggio di Programmazione JavaScript, Standard ECMA-262 Terza Edizione -
Dicembre 1999.
JSON è un formato di testo completamente indipendente dal linguaggio di
programmazione, ma utilizza convenzioni conosciute dai programmatori di
linguaggi della famiglia del C, come C, C++, C#, Java, JavaScript, Perl, Python
e molti altri. Questa caratteristica fa di JSON un linguaggio ideale per lo
scambio di dati.
JSON è basato su due strutture:
     * Un insieme di coppie nome/valore. In diversi linguaggi questo è realizzato
come un oggetto, un record, una struct, un dizionario, una tabella hash, un
elenco di chiavi o un array associativo.
     * Un elenco ordinato di valori. Nella maggior parte dei linguaggi questo si
realizza con un array, un vettore, un elenco o una sequenza.
Queste sono strutture di dati universali. Virtualmente tutti i linguaggi di
programmazione moderni li supportano in entrambe le forme. E' sensato che un
formato di dati che è interscambiabile con linguaggi di programmazione debba
essere basato su queste strutture.
In JSON, assumono queste forme:
Un oggetto è una serie non ordinata di nomi/valori. Un oggetto inizia con {
(parentesi graffa sinistra) e finisce con } (parentesi graffa destra). Ogni nome
è seguito da : (due punti) e le coppie di nome/valore sono separate da ,
(virgola).
Un array è una raccolta ordinata di valori. Un array comincia con [ (parentesi
quadra sinistra) e finisce con ] (parentesi quadra destra). I valori sono
separati da , (virgola).
Un valore può essere una stringa tra virgolette, o un numero, o vero o falso o
nullo, o un oggetto o un array. Queste strutture possono essere annidate.
Una stringa è una raccolta di zero o più caratteri Unicode, tra virgolette; per
le sequenze di escape utilizza la barra rovesciata. Un singolo carattere è
rappresentato come una stringa di caratteri di lunghezza uno. Una stringa è
molto simile ad una stringa C o Java.
Un numero è molto simile ad un numero C o Java, a parte il fatto che i formati
ottali e esadecimali non sono utilizzati.
I caratteri di spaziatura possono essere inseriti in mezzo a qualsiasi coppia di
token.
A parte alcuni dettagli di codifica, questo descrive totalmente il linguaggio.

   -----Original Message-----
   From: json@yahoogroups.com [mailto:json@yahoogroups.com]On Behalf Of Douglas
Crockford
   Sent: Sunday, November 05, 2006 2:29 AM
   To: json@yahoogroups.com
   Subject: [json] json.org


   The main JSON page is available in Chinese English French German
   Italian Japanese Korean, and now Spanish.

   Please advise me of any corrections.

   If you are fluent in a language not on the list, would you like to
   contribute a translation?





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

#570 From: "rutherfordinbelfast" <matrutherford@...>
Date: Mon Nov 6, 2006 8:43 pm
Subject: public json apis
rutherfordin...
Send Email Send Email
 
Alright there guys

Just come on board the json bandwagon, love the potential it promises
over xmlhttprequest.  But the mainstream web2.0 crowd doesn't seem to
have caught on to it as yet - most mashable API's are still xml-
based.

Is there any list out there covering the spread of json-based API's?

#571 From: JMathai <j_t_mathai@...>
Date: Tue Nov 7, 2006 4:11 am
Subject: Re: public json apis
j_t_mathai
Send Email Send Email
 
Our JavaScript library for our JSON API is public.  There are copy/paste
examples.  We will be releasing the docs for our JSON API will be released soon.

The JavaScript one is at http://www.photagious.com/api/documentation/javascript/

----- Original Message ----
From: rutherfordinbelfast <matrutherford@...>
To: json@yahoogroups.com
Sent: Monday, 6 November, 2006 3:43:43 PM
Subject: [json] public json apis













             Alright there guys



Just come on board the json bandwagon, love the potential it promises

over xmlhttprequest.  But the mainstream web2.0 crowd doesn't seem to

have caught on to it as yet - most mashable API's are still xml-

based.



Is there any list out there covering the spread of json-based API's?














<!--

#ygrp-mlmsg {font-size:13px;font-family:arial,helvetica,clean,sans-serif;}
#ygrp-mlmsg table {font-size:inherit;font:100%;}
#ygrp-mlmsg select, input, textarea {font:99% arial,helvetica,clean,sans-serif;}
#ygrp-mlmsg pre, code {font:115% monospace;}
#ygrp-mlmsg * {line-height:1.22em;}
#ygrp-text{
font-family:Georgia;
}
#ygrp-text p{
margin:0 0 1em 0;
}
#ygrp-tpmsgs{
font-family:Arial;
clear:both;
}
#ygrp-vitnav{
padding-top:10px;
font-family:Verdana;
font-size:77%;
margin:0;
}
#ygrp-vitnav a{
padding:0 1px;
}
#ygrp-actbar{
clear:both;
margin:25px 0;
white-space:nowrap;
color:#666;
text-align:right;
}
#ygrp-actbar .left{
float:left;
white-space:nowrap;
}
.bld{font-weight:bold;}
#ygrp-grft{
font-family:Verdana;
font-size:77%;
padding:15px 0;
}
#ygrp-ft{
font-family:verdana;
font-size:77%;
border-top:1px solid #666;
padding:5px 0;
}
#ygrp-mlmsg #logo{
padding-bottom:10px;
}

#ygrp-vital{
background-color:#e0ecee;
margin-bottom:20px;
padding:2px 0 8px 8px;
}
#ygrp-vital #vithd{
font-size:77%;
font-family:Verdana;
font-weight:bold;
color:#333;
text-transform:uppercase;
}
#ygrp-vital ul{
padding:0;
margin:2px 0;
}
#ygrp-vital ul li{
list-style-type:none;
clear:both;
border:1px solid #e0ecee;
}
#ygrp-vital ul li .ct{
font-weight:bold;
color:#ff7900;
float:right;
width:2em;
text-align:right;
padding-right:.5em;
}
#ygrp-vital ul li .cat{
font-weight:bold;
}
#ygrp-vital a {
text-decoration:none;
}

#ygrp-vital a:hover{
text-decoration:underline;
}

#ygrp-sponsor #hd{
color:#999;
font-size:77%;
}
#ygrp-sponsor #ov{
padding:6px 13px;
background-color:#e0ecee;
margin-bottom:20px;
}
#ygrp-sponsor #ov ul{
padding:0 0 0 8px;
margin:0;
}
#ygrp-sponsor #ov li{
list-style-type:square;
padding:6px 0;
font-size:77%;
}
#ygrp-sponsor #ov li a{
text-decoration:none;
font-size:130%;
}
#ygrp-sponsor #nc {
background-color:#eee;
margin-bottom:20px;
padding:0 8px;
}
#ygrp-sponsor .ad{
padding:8px 0;
}
#ygrp-sponsor .ad #hd1{
font-family:Arial;
font-weight:bold;
color:#628c2a;
font-size:100%;
line-height:122%;
}
#ygrp-sponsor .ad a{
text-decoration:none;
}
#ygrp-sponsor .ad a:hover{
text-decoration:underline;
}
#ygrp-sponsor .ad p{
margin:0;
}
o {font-size:0;}
.MsoNormal {
margin:0 0 0 0;
}
#ygrp-text tt{
font-size:120%;
}
blockquote{margin:0 0 0 4px;}
.replbq {margin:4;}
-->











___________________________________________________________
All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of
use." - PC Magazine
http://uk.docs.yahoo.com/nowyoucan.html

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

#572 From: "Douglas Crockford" <douglas@...>
Date: Tue Nov 7, 2006 6:33 pm
Subject: XML2006
douglascrock...
Send Email Send Email
 
I will be presenting on JSON at XML2006 in Boston, December 5-7.

#573 From: "Gustavo Muñoz" <justavo@...>
Date: Wed Nov 8, 2006 8:18 am
Subject: Re: XML2006
justavo_munoz
Send Email Send Email
 
Douglas,

Do you want some support from the community to inform you of some clever
uses of JSON?
Success stories?
Do you want to hear of more cases where JSON was used in favor of XML?

Was your mail strictly informational regarding next public conference you
are going to be talking about JSON?

/Gus

On 11/7/06, Douglas Crockford <douglas@...> wrote:
>
>   I will be presenting on JSON at XML2006 in Boston, December 5-7.
>
>
>



--
Blog: http://justavo.blogsome.com/


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

#574 From: "Douglas Crockford" <douglas@...>
Date: Wed Nov 8, 2006 11:22 pm
Subject: Re: XML2006
douglascrock...
Send Email Send Email
 
> >   I will be presenting on JSON at XML2006 in Boston, December 5-7.

> Do you want some support from the community to inform you of some clever
> uses of JSON?
> Success stories?
> Do you want to hear of more cases where JSON was used in favor of XML?
>
> Was your mail strictly informational regarding next public
conference you
> are going to be talking about JSON?

It was strictly informational. If any of you are at the conference,
I'd like to meet you.

#575 From: "Michael Schwarz" <michael.schwarz@...>
Date: Thu Nov 9, 2006 2:52 pm
Subject: Re: Re: XML2006
schwarz_inte...
Send Email Send Email
 
I know there are several requests, but what about a conference here in
Europe?

Regards,
Michael



On 11/9/06, Douglas Crockford <douglas@...> wrote:
>
>   > > I will be presenting on JSON at XML2006 in Boston, December 5-7.
>
> > Do you want some support from the community to inform you of some clever
> > uses of JSON?
> > Success stories?
> > Do you want to hear of more cases where JSON was used in favor of XML?
> >
> > Was your mail strictly informational regarding next public
> conference you
> > are going to be talking about JSON?
>
> It was strictly informational. If any of you are at the conference,
> I'd like to meet you.
>
>
>



--
Best regards | Schöne Grüße
Michael

Microsoft MVP - Most Valuable Professional
Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz/
http://www.ajaxpro.info/
http://www.thumboo.com/

Skype: callto:schwarz-interactive
MSN IM: passport@...


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

#576 From: "Douglas Crockford" <douglas@...>
Date: Fri Nov 10, 2006 2:15 pm
Subject: Re: XML2006
douglascrock...
Send Email Send Email
 
> I know there are several requests, but what about a conference here in
> Europe?

I was at W3C 2006 in Edinburgh this year.
If invited, I would go anywhere.

#577 From: "graham615" <graham615@...>
Date: Sat Nov 11, 2006 8:36 pm
Subject: Re: JSON Schema
graham615
Send Email Send Email
 
I am looking to do the same thing.  I am looking at Gold Parser.  I
need to get a BNF description of JSON.  Gold parser will create the
parse tables then the engine will use this to validate and parse the
input.  Anyone have BNF for JSON?

Graham............


--- In json@yahoogroups.com, Pradhap Nirmal Natarajan
<prathapnirmal@...> wrote:
>
>
> Thanks for the reply Cheenu,
>   But I am looking for a simple validator. Say I write a schema, pass
> the json data and the schema to a validator written in any language ->
> which returns a result whether the data is valid or not. If not valid,
> what is the error?
>
> Thanks
> ~
> Prathap
>
> Cheenu wrote:
> >
> > Last week somebody had posted this
> > http://tech.groups.yahoo.com/group/json/message/533
> > <http://tech.groups.yahoo.com/group/json/message/533>
> >
> > You can also use the JSON Api's for various languages as validators.
> >
> > Cheenu
> >
> > On 10/16/06, Pradhap Nirmal Natarajan <prathapnirmal@...
> > <mailto:prathapnirmal%40gmail.com>> wrote:
> > >
> > > Hi All,
> > > I am wondering if there is anything called as JSON Schema and a
> > > validator to validate my JSON data. I use a lot of nested JSON
data and
> > > it takes more time to find out the problem in my apps, which is
most of
> > > the times *key name mismatches* in the data sent from server or the
> > > javascript code that uses it. It will be great if we can have some
> > > schema and validator. Is there anything available already? Any
> > directions?
> > >
> > > Thanks
> > > ~
> > > Prathap
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > >
> > >
> >
> > [Non-text portions of this message have been removed]
> >
> >
>
>
> [Non-text portions of this message have been removed]
>

#578 From: "Douglas Crockford" <douglas@...>
Date: Mon Nov 13, 2006 1:49 am
Subject: JsonML
douglascrock...
Send Email Send Email
 
JsonML is an application of JSON for document markup. JSON was not
designed for such applications, and is not as effective than XML (much
as XML is less effective than JSON for data interchange). Still,
JsonML might be useful for some purposes.

http://jsonml.org/

#579 From: Mark Miller <markm@...>
Date: Mon Nov 13, 2006 4:23 am
Subject: Re: JsonML
capsecure
Send Email Send Email
 
Douglas Crockford wrote:
> JsonML is an application of JSON for document markup. JSON was not
> designed for such applications, and is not as effective than XML (much
> as XML is less effective than JSON for data interchange). Still,
> JsonML might be useful for some purposes.
>
> http://jsonml.org/

  From there:

> attribute-list
>   = attribute ',' attribute-list
>   | attribute
>   ;
> attribute
>   = attribute-name ':' attribute-value ',' attribute
>   | attribute-name ':' attribute-value
>   ;

  From this BNF, a comma separated list of attribute is an attribute, but is
also an attribute-list. I think you left in a redundant production.

--
Text by me above is hereby placed in the public domain

      Cheers,
      --MarkM

#580 From: Mark Miller <markm@...>
Date: Mon Nov 13, 2006 6:15 am
Subject: Re: JsonML
capsecure
Send Email Send Email
 
Douglas Crockford wrote:
> JsonML is an application of JSON for document markup. JSON was not
> designed for such applications, and is not as effective than XML (much
> as XML is less effective than JSON for data interchange). Still,
> JsonML might be useful for some purposes.
>
> http://jsonml.org/


What about XML namespaces? Processing instructions? XML comments?


--
Text by me above is hereby placed in the public domain

      Cheers,
      --MarkM

#581 From: Michal Migurski <mike-jsonphp@...>
Date: Mon Nov 13, 2006 5:15 pm
Subject: Re: JsonML
michal_migurski
Send Email Send Email
 
> Douglas Crockford wrote:
> > JsonML is an application of JSON for document markup. JSON was not
> > designed for such applications, and is not as effective than XML
> (much
> > as XML is less effective than JSON for data interchange). Still,
> > JsonML might be useful for some purposes.
> >
> > http://jsonml.org/
>
> What about XML namespaces? Processing instructions? XML comments?

La, la, la (hands placed over ears).

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

#582 From: "Martin Cooper" <mfncooper@...>
Date: Mon Nov 13, 2006 5:37 pm
Subject: Re: JsonML
mfncooper
Send Email Send Email
 
On 11/12/06, Mark Miller <markm@...> wrote:
>
> Douglas Crockford wrote:
> > JsonML is an application of JSON for document markup. JSON was not
> > designed for such applications, and is not as effective than XML (much
> > as XML is less effective than JSON for data interchange). Still,
> > JsonML might be useful for some purposes.
> >
> > http://jsonml.org/
>
> From there:
>
> > attribute-list
> >   = attribute ',' attribute-list
> >   | attribute
> >   ;
> > attribute
> >   = attribute-name ':' attribute-value ',' attribute
> >   | attribute-name ':' attribute-value
> >   ;
>
> From this BNF, a comma separated list of attribute is an attribute, but is
> also an attribute-list. I think you left in a redundant production.


As far as I can tell, Doug is just the messenger here, and is not
responsible for JsonML. Also, there's no indication that the real author
(Stephen M. McKamey, according to the web site) is on this list. So you
might want to direct your feedback to the author instead of the messenger.
;-)

--
Martin Cooper


--
> Text by me above is hereby placed in the public domain
>
>      Cheers,
>      --MarkM
>
>
>
> Yahoo! Groups Links
>
>
>
>
>


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

#583 From: "Stephen M. McKamey" <jsonml@...>
Date: Mon Nov 13, 2006 5:54 pm
Subject: Re: JsonML
stephen.mckamey
Send Email Send Email
 
I just joined as you were writing...

I noticed the post about the grammar redundancy and you are right, so
I changed it last night.  Also I made some simplifications based on
Douglas Crockford's suggestion that have reduced the total JSON-text
size and improved rendering speed.

Thanks,
Stephen

--- In json@yahoogroups.com, "Martin Cooper" <mfncooper@...> wrote:
>
> On 11/12/06, Mark Miller <markm@...> wrote:
> >
> > Douglas Crockford wrote:
> > > JsonML is an application of JSON for document markup. JSON was
not
> > > designed for such applications, and is not as effective than
XML (much
> > > as XML is less effective than JSON for data interchange). Still,
> > > JsonML might be useful for some purposes.
> > >
> > > http://jsonml.org/
> >
> > From there:
> >
> > > attribute-list
> > >   = attribute ',' attribute-list
> > >   | attribute
> > >   ;
> > > attribute
> > >   = attribute-name ':' attribute-value ',' attribute
> > >   | attribute-name ':' attribute-value
> > >   ;
> >
> > From this BNF, a comma separated list of attribute is an
attribute, but is
> > also an attribute-list. I think you left in a redundant
production.
>
>
> As far as I can tell, Doug is just the messenger here, and is not
> responsible for JsonML. Also, there's no indication that the real
author
> (Stephen M. McKamey, according to the web site) is on this list. So
you
> might want to direct your feedback to the author instead of the
messenger.
> ;-)
>
> --
> Martin Cooper
>
>
> --
> > Text by me above is hereby placed in the public domain
> >
> >      Cheers,
> >      --MarkM
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>

#584 From: "Stephen M. McKamey" <jsonml@...>
Date: Mon Nov 13, 2006 6:13 pm
Subject: Re: JsonML
stephen.mckamey
Send Email Send Email
 
To be honest, JsonML was never meant to replace XML, simply to more
tightly work with XML-based markup in a JSON-savvy framework.

I don't see any reason why shorthand for XML namespaces couldn't be
supported as part of the tag-name (e.g. "myns:my-element"), but I
haven't formalize a way to specify what the alias resolves
to.
It makes sense that it would be the same as in XML where there are
simply
attributes on the root element which specify this:

["html:div",
     {
         "xmlns":"http://www.w3.org/1999/xhtml",
         "xmlns:html":"http://www.w3.org/1999/xhtml"
     },
...]

As for processing instructions, I'm not sure what an applicable
instruction would be as it depends on the recieving client.  If you
look at my example build script for building DOM, I have a commented
out section which effectively enables script blocks to be sent and
executed.  This might be the analogy that you are looking for, but
I've
excluded it from the default implementation due to security issues.

And finally XML comments are really not consistent with the purpose
of
this syntax, and as such I would recommend dropping them.

--- In json@yahoogroups.com, Mark Miller <markm@...> wrote:
> What about XML namespaces? Processing instructions? XML comments?

#585 From: "Douglas Crockford" <douglas@...>
Date: Mon Nov 13, 2006 7:43 pm
Subject: JSON CSS
douglascrock...
Send Email Send Email
 
Here is another crossover application of JSON:
http://www.featureblend.com/css-json.html

#586 From: "Stephen M. McKamey" <jsonml@...>
Date: Tue Nov 14, 2006 12:16 am
Subject: Re: json.js breaks for-in loops
stephen.mckamey
Send Email Send Email
 
--- In json@yahoogroups.com, Tom Metro <tmetro+json@...> wrote:
>
> Peter Michaux wrote:
> > By extending the Object.prototype with the new property
toJSONString I
> > can no longer use for-in loops in my JavaScript.
>
> As another poster mentioned, using hasOwnProperty(), is the way to
make
> the intended behavior work. My understanding is that hasOwnProperty()
> isn't widely supported yet.

A little late to the conversation but... another alternative could be
to use the typeof operator (assuming one was iterating over data):

for(k in obj)
     if("function"!=typeof obj[k])
       foo(k);

Thanks,
smm

#587 From: "Martin Cooper" <mfncooper@...>
Date: Tue Nov 14, 2006 1:17 am
Subject: Re: Re: json.js breaks for-in loops
mfncooper
Send Email Send Email
 
On 11/13/06, Stephen M. McKamey <jsonml@...> wrote:
>
> --- In json@yahoogroups.com, Tom Metro <tmetro+json@...> wrote:
> >
> > Peter Michaux wrote:
> > > By extending the Object.prototype with the new property
> toJSONString I
> > > can no longer use for-in loops in my JavaScript.
> >
> > As another poster mentioned, using hasOwnProperty(), is the way to
> make
> > the intended behavior work. My understanding is that hasOwnProperty()
> > isn't widely supported yet.
>
> A little late to the conversation but... another alternative could be
> to use the typeof operator (assuming one was iterating over data):
>
> for(k in obj)
>     if("function"!=typeof obj[k])
>       foo(k);


Sure - if the for loop is in your own code, and not some other package that
you're just trying to make use of.

This issue really needs to be fixed in the JSON code, since there's no way
you can rely on it being fixed in all the other code out there that you
might want to use.

--
Martin Cooper


Thanks,
> smm
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>


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

#588 From: "Stephen M. McKamey" <jsonml@...>
Date: Tue Nov 14, 2006 2:01 am
Subject: Re: json.js breaks for-in loops
stephen.mckamey
Send Email Send Email
 
// This should do what you are asking for while staying
// current with Crockford's latest code:

// after json.js has loaded...
// define a namespace to minimize footprint
var JSON = {};

// add all of the methods
JSON.arrayToJSONString = Array.prototype.toJSONString;
JSON.booleanToJSONString = Boolean.prototype.toJSONString;
JSON.dateToJSONString = Date.prototype.toJSONString;
JSON.numberToJSONString = Number.prototype.toJSONString;
JSON.objectToJSONString = Object.prototype.toJSONString;
JSON.stringToJSONString = String.prototype.toJSONString;
JSON.parseJSON = String.prototype.parseJSON;

// remove all the methods from intrinsic objects
delete(Array.prototype.toJSONString);
delete(Boolean.prototype.toJSONString);
delete(Date.prototype.toJSONString);
delete(Number.prototype.toJSONString);
delete(Object.prototype.toJSONString);
delete(String.prototype.toJSONString);
delete(String.prototype.parseJSON);

--- In json@yahoogroups.com, "Martin Cooper" <mfncooper@...> wrote:
> Sure - if the for loop is in your own code, and not some other
package that
> you're just trying to make use of.
>
> This issue really needs to be fixed in the JSON code, since there's
no way
> you can rely on it being fixed in all the other code out there that
you
> might want to use.

#589 From: "Martin Cooper" <mfncooper@...>
Date: Tue Nov 14, 2006 2:35 am
Subject: Re: Re: json.js breaks for-in loops
mfncooper
Send Email Send Email
 
On 11/13/06, Stephen M. McKamey <jsonml@...> wrote:
>
> // This should do what you are asking for while staying
> // current with Crockford's latest code:


Right. But I don't understand the resistance (or, actually, just lack of any
feedback at all) to having the kind of solution I described before (in
another thread) incorporated into the original source code, so that we don't
have to be going and deleting things like that. Here's what I suggested
before, which is largely the same as yours, except that mine avoids creation
where yours utilises deletion and is necessarily separate (and hence a
little less easily maintained) from the original:

http://tech.groups.yahoo.com/group/json/message/557

--
Martin Cooper


// after json.js has loaded...
> // define a namespace to minimize footprint
> var JSON = {};
>
> // add all of the methods
> JSON.arrayToJSONString = Array.prototype.toJSONString;
> JSON.booleanToJSONString = Boolean.prototype.toJSONString;
> JSON.dateToJSONString = Date.prototype.toJSONString;
> JSON.numberToJSONString = Number.prototype.toJSONString;
> JSON.objectToJSONString = Object.prototype.toJSONString;
> JSON.stringToJSONString = String.prototype.toJSONString;
> JSON.parseJSON = String.prototype.parseJSON;
>
> // remove all the methods from intrinsic objects
> delete(Array.prototype.toJSONString);
> delete(Boolean.prototype.toJSONString);
> delete(Date.prototype.toJSONString);
> delete(Number.prototype.toJSONString);
> delete(Object.prototype.toJSONString);
> delete(String.prototype.toJSONString);
> delete(String.prototype.parseJSON);
>
> --- In json@yahoogroups.com, "Martin Cooper" <mfncooper@...> wrote:
> > Sure - if the for loop is in your own code, and not some other
> package that
> > you're just trying to make use of.
> >
> > This issue really needs to be fixed in the JSON code, since there's
> no way
> > you can rely on it being fixed in all the other code out there that
> you
> > might want to use.
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>


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

#590 From: "Douglas Crockford" <douglas@...>
Date: Tue Nov 14, 2006 2:06 pm
Subject: Re: json.js breaks for-in loops
douglascrock...
Send Email Send Email
 
JavaScript is an imperfect language. The weird interaction between
augmentation of prototypes with the for..in statement is evidence of
this. This defect in the language requires that for..in blocks
explicitly filter out unwanted stuff that is dredged up from the
prototype chain. See http://yuiblog.com/blog/2006/09/26/for-in-intrigue/

json.js provides the same API that will be built into ECMAScript
Fourth Edition. That means that if your program works with json.js,
then it will work even better when the language is revised.

Some people do not have the luxury of being forward looking. They have
to work with bad code that does not filter for..in, or they claim the
right to write bad code themselves. Those people should not be using
json.js. Fortunately, JSON encoding and decoding is so easy, there
isn't much effort required to make an implementation that works with
bad code.

JSON is a standard data representation. The json.js implementation is
not the standard. It is a reference implementation. You are free to
use it in any way that you want, or to not use it.

#591 From: "Kevin Prichard" <kprichard@...>
Date: Tue Nov 14, 2006 5:18 pm
Subject: slightly off-topic: openjsan.org
kevin3prichard
Send Email Send Email
 
http://openjsan.org/

A CPAN-alike for Javascript library projects.  Search appears to be
broken, but overall looks useful.

#592 From: "Stephen M. McKamey" <jsonml@...>
Date: Thu Nov 16, 2006 1:43 pm
Subject: Re: JsonML
stephen.mckamey
Send Email Send Email
 
I just posted on http://jsonml.org an XSLT for generically converting
XML to JsonML.  This might help people better visualize the markup.

--- In json@yahoogroups.com, Mark Miller <markm@...> wrote:
>
> Douglas Crockford wrote:
> > JsonML is an application of JSON for document markup. JSON was not
> > designed for such applications, and is not as effective than XML
(much
> > as XML is less effective than JSON for data interchange). Still,
> > JsonML might be useful for some purposes.
> >
> > http://jsonml.org/
>
>
> What about XML namespaces? Processing instructions? XML comments?
>
>
> --
> Text by me above is hereby placed in the public domain
>
>      Cheers,
>      --MarkM
>

#593 From: "Gaetano Giunta" <giunta.gaetano@...>
Date: Fri Nov 17, 2006 8:59 am
Subject: A comparison of json libs for PHP
gaetanogiunt...
Send Email Send Email
 
Hi all.

I tought you might interested in the comparison of PHP json libs I posted here:
http://gggeek.altervista.org/sw/article_20061113.html

Any feedback is appreciated.

Bye
Gaetano Giunta

Messages 564 - 593 of 1953   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