-
Notifications
You must be signed in to change notification settings - Fork 356
Closed
Description
I've read about the recent performance gains in this gem. Congratulations!
It's nothing urgent but eventually I'd love to switch from Oj to this gem. Currently I can't do that because Time objects are not encoded as ISO8601, which is what Javascript's Date.parse() expects.
Specifically, I've been using these Oj options:
OJ_OPTIONS = {
mode: :custom,
symbol_keys: true,
time_format: :xmlschema, # ISO 8601, compatible with JavaScript's Date.parse()
allow_gc: false,
second_precision: 3,
cache_keys: true,
cache_str: 35
# NOTE: MUST NOT use use_to_json. Because some gem requires 'json' (and also the specs), Time#to_json gets defined
# and will be used by Oj. It's not ISO8601.
# use_to_json: true,
}Would it be possible to add options time_format: :xmlschema and second_precision: N to JSON.generate?
Metadata
Metadata
Assignees
Labels
No labels