Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] Re: YUI doesn't use valid JSON

Expand Messages
  • Adam Moore
    ... This data structure is not a JSON object, nor is it represented as such in the example. However, I agree that making it a valid JSON object would make the
    Message 1 of 5 , Oct 29, 2008
    • 0 Attachment
      On Wed, Oct 29, 2008 at 10:00:17PM -0000, Steven wrote:
      > --- In ydn-javascript@yahoogroups.com, Adam Moore <adamoore@...> wrote:
      > > No.
      > >
      > > If you have found a broken JSON structure, please file a bug report.
      > > Please specify exactly where you discovered the issue.
      > >
      > > http://developer.yahoo.com/yui/#filingbugs
      > >
      > > -Adam
      >
      > Take a look at the DataTable example at
      > http://developer.yahoo.com/yui/examples/datatable/dt_basic.html.
      > Notice that all of the keys do not have double quotes such as 'id',
      > 'date', 'quantity', 'amount', etc. That's okay since you can add the
      > double quotes with no problems.

      This data structure is not a JSON object, nor is it represented as such
      in the example. However, I agree that making it a valid JSON object
      would make the example a little more useful.

      > However, that is not the case with double quotes on the value. For
      > 'quantity', notice that the values are not double quoted. DataTable
      > treats this type as an integer and when you sort it, it behaves as you
      > would expect, that is 6 comes before 12 in ascending order (although
      > the null value which appears as '0' doesn't get sorted properly). You
      > can try this out on that web page. If you double quote the values,
      > DataTable will treat this type as a string and therefore, 12 will come
      > before 6 in ascending order because the '1' comes before the '6' in
      > the character set.

      Keys must be strings, but values can be numbers. You shouldn't quote
      the numeric values.

      -Adam
    Your message has been successfully submitted and would be delivered to recipients shortly.