JSON data and THEN-BY sorting

24 views
Skip to first unread message

Boof

unread,
Aug 19, 2011, 9:41:28 AM8/19/11
to SIMILE Widgets
1) I'm successfully using this date in my JSON file:

beginDate: "1840-1-1",

but want to use this because I understand loading time is faster:

beginDate: new Date(1840,0,1),

Currently my JSON has all of the first type format, except this test
-- I just changed one record to the Date() function. But my tile
display doesn't sort the event properly. It puts it after all the
other dates as "Wed Jan 1 00:00:00 EST 1840."

2) How do I implement the "then by..." option in the tile view? Can't
seem to find any info on this.

Ryan Lee

unread,
Aug 26, 2011, 4:19:29 PM8/26/11
to simile-...@googlegroups.com
Hi,

On 8/19/11 6:41 AM, Boof wrote:
> 1) I'm successfully using this date in my JSON file:
>
> beginDate: "1840-1-1",
>
> but want to use this because I understand loading time is faster:
>
> beginDate: new Date(1840,0,1),

Where did you pick that tip up? Try it in http://jsonlint.com/, because
that isn't valid JSON as far as I know.

> Currently my JSON has all of the first type format, except this test
> -- I just changed one record to the Date() function. But my tile
> display doesn't sort the event properly. It puts it after all the
> other dates as "Wed Jan 1 00:00:00 EST 1840."

> 2) How do I implement the "then by..." option in the tile view? Can't
> seem to find any info on this.

http://www.simile-widgets.org/wiki/Exhibit/Tile_View lists it under
ex:orders or ex:possibleOrders depending on what you mean by implement.

Boof

unread,
Aug 27, 2011, 10:35:55 AM8/27/11
to SIMILE Widgets
Thanks Ryan.

Q1) On this, I was looking at:

http://code.google.com/p/simile-widgets/wiki/Timeline_EventSourceJSON_jsDate

I do not know JSON or Javascript, but I know Exhibit sees it as a date
because it comes back with "Wed Jan 1 00:00:00 EST 1840." I just
figured it would get sorted in my Table with all the other "1840-1-1"
type dates. But I'm thinking the Table is treating 1840-1-1 as a text
sort.

Q2) I still don't get this. Have tried the possibleOrders but they
just show up in the first level sort as options...not in the Then-By.


On Aug 26, 4:19 pm, Ryan Lee <ryan...@zepheira.com> wrote:
> Hi,
>
> On 8/19/11 6:41 AM, Boof wrote:
>
> > 1) I'm successfully using this date in my JSON file:
>
> >   beginDate: "1840-1-1",
>
> > but want to use this because I understand loading time is faster:
>
> >   beginDate: new Date(1840,0,1),
>
> Where did you pick that tip up?  Try it inhttp://jsonlint.com/, because
> that isn't valid JSON as far as I know.
>
> > Currently my JSON has all of the first type format, except this test
> > -- I just changed one record to the Date() function. But my tile
> > display doesn't sort the event properly. It puts it after all the
> > other dates as "Wed Jan 1 00:00:00 EST 1840."
> > 2) How do I implement the "then by..." option in the tile view? Can't
> > seem to find any info on this.
>
> http://www.simile-widgets.org/wiki/Exhibit/Tile_Viewlists it under

Boof

unread,
Aug 27, 2011, 12:21:39 PM8/27/11
to SIMILE Widgets
On the "Then By" issue, I just looked at my Exhibit in Chrome and
Firefox and all is well. The problem is ie9?

---Boof.

On Aug 27, 10:35 am, Boof <corpora...@valethics.com> wrote:
> Thanks Ryan.
>
> Q1) On this, I was looking at:
>
> http://code.google.com/p/simile-widgets/wiki/Timeline_EventSourceJSON...
>
> I do not know JSON or Javascript, but I know Exhibit sees it as a date
> because it comes back with "Wed Jan 1 00:00:00 EST 1840." I just
> figured it would get sorted in my Table with all the other "1840-1-1"
> type dates. But I'm thinking the Table is treating 1840-1-1 as a text
> sort.
>
> Q2) I still don't get this. Have tried the possibleOrders but they
> just show up in the first level sort as options...not in the Then-By.
>
> On Aug 26, 4:19 pm, Ryan Lee <ryan...@zepheira.com> wrote:
>
>
>
> > Hi,
>
> > On 8/19/11 6:41 AM, Boof wrote:
>
> > > 1) I'm successfully using this date in my JSON file:
>
> > >   beginDate: "1840-1-1",
>
> > > but want to use this because I understand loading time is faster:
>
> > >   beginDate: new Date(1840,0,1),
>
> > Where did you pick that tip up?  Try it inhttp://jsonlint.com/, because
> > that isn't valid JSON as far as I know.
>
> > > Currently my JSON has all of the first type format, except this test
> > > -- I just changed one record to the Date() function. But my tile
> > > display doesn't sort the event properly. It puts it after all the
> > > other dates as "Wed Jan 1 00:00:00 EST 1840."
> > > 2) How do I implement the "then by..." option in the tile view? Can't
> > > seem to find any info on this.
>
> >http://www.simile-widgets.org/wiki/Exhibit/Tile_Viewlistsit under
> > ex:orders or ex:possibleOrders depending on what you mean by implement.- Hide quoted text -
>
> - Show quoted text -

Ryan Lee

unread,
Aug 31, 2011, 8:05:18 PM8/31/11
to simile-...@googlegroups.com
Hello,

On 8/27/11 7:35 AM, Boof wrote:
> Thanks Ryan.
>
> Q1) On this, I was looking at:
>
> http://code.google.com/p/simile-widgets/wiki/Timeline_EventSourceJSON_jsDate
>
> I do not know JSON or Javascript, but I know Exhibit sees it as a date
> because it comes back with "Wed Jan 1 00:00:00 EST 1840." I just
> figured it would get sorted in my Table with all the other "1840-1-1"
> type dates. But I'm thinking the Table is treating 1840-1-1 as a text
> sort.

Ah. Well, I'm of the opinion that it would be better to skip that piece
of advice. Stick with common usage of the JSON spec. I'm curious about
quantifying the performance improvement of using that trick. Does it
justify making not-quite JSON unusable elsewhere?

> Q2) I still don't get this. Have tried the possibleOrders but they
> just show up in the first level sort as options...not in the Then-By.

You noted in a later message that IE9 appears to the source of the
problem. There's always been a measure of problems with IE, I expect
it's probably an HTML class attribute naming problem, though I don't
have IE9 in front of me to look at the moment.

Boof

unread,
Sep 7, 2011, 12:18:30 PM9/7/11
to SIMILE Widgets
Can anyone please help with this?

As far as "pure" JSON I don't want to be a heretic but I didn't even
know the term before I started this project. I'm pretty sure I won't
be doing anything else with this data. If the date coding makes a nice
difference in performance that would be good as I have many items to
load.

On the Then-By issue, I do think getting this to work in IE9 is a
worthy cause since statistics still show it being one of the most
popular browsers.

Thanks in advance for any additional help.

---Boof.

On Aug 31, 8:05 pm, Ryan Lee <ryan...@zepheira.com> wrote:
> Hello,
>
> On 8/27/11 7:35 AM, Boof wrote:
>
> > Thanks Ryan.
>
> > Q1) On this, I was looking at:
>
> >http://code.google.com/p/simile-widgets/wiki/Timeline_EventSourceJSON...
Reply all
Reply to author
Forward
0 new messages