-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add first-class support for Date-Time values for JSON-API #362
Comments
Just a couple of details to confirm:
|
@vkarpov15 Excellent -- thank you confirming. This aligns with our understanding of things, plans (only supporting |
This was referenced Apr 18, 2023
tatu-at-datastax
changed the title
Add first-class support for Date-Time (and possibly Date) values for JSON-API
Add first-class support for Date-Time values for JSON-API
Apr 25, 2023
All sub-tasks completed, Date-Time type support considered complete. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently we support a subset of datatypes Mongoose supports, basically matching native JSON types (Objects/sub-docs, Arrays, Number, Strings, Booleans, null), and one pseudo-type (Doc Id).
It would make sense to also support Date/Time, so users need not handle conversion to/from JSON String or Number types, but can use native Javascript Date type (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) on client-side and get it efficiently handled on JSON API server side.
Current thinking is to convention defined by EJSON (https://docs.meteor.com/api/ejson.html), in which numeric (milliseconds since 1.1.1970 timestamp, standard used by Java and Javascript as well as many other platforms) is encapsulates as a single-entry JSON Object like:
This allows for reliable auto-detection because JSON API Object/sub-doc properties can not start with
$
character.Details of this approach will be added here and after/during prototyping Spec needs to be updated. We will also file separate issues for different parts of handling; so tasks include:
query_timestamp_values
, Shredding support #370)_id
) handling to recognize and support new id type ((Date/Time support) allow use of Date/Time as Document Id (_id
) #371)$currentDate
update operation ((Date/Time support) Add$currentDate
update operation #397)The text was updated successfully, but these errors were encountered: