One thing I'll need soon, though, is support for dates. Basically, in addition to int, string, bool or slice in Where expressions, I need to be able to use dates. Somehow (tbd), I would expect to specify the format of the date string which would apply to both the string I pass as val to Where as well as what I'm expecting to be found in the JSON. Ideally, this format could be any of the predefined layouts supported by time.Parse. The Whereop arguments would need to be extended to support the equivalents of time.After, time.Before and time.Equal. Finally, I need a way to traverse a JSON collection in chronological order or at a minimum pull the first or last chronologically from a collection. E.g. date-aware variations on Sort and SortBy would suffice.
Looks great. I'm eager to start trying it out.
One thing I'll need soon, though, is support for dates. Basically, in addition to int, string, bool or slice in
Where
expressions, I need to be able to use dates. Somehow (tbd), I would expect to specify the format of the date string which would apply to both the string I pass as val toWhere
as well as what I'm expecting to be found in the JSON. Ideally, this format could be any of the predefined layouts supported bytime.Parse
. TheWhere
op arguments would need to be extended to support the equivalents oftime.After
,time.Before
andtime.Equal
. Finally, I need a way to traverse a JSON collection in chronological order or at a minimum pull the first or last chronologically from a collection. E.g. date-aware variations onSort
andSortBy
would suffice.