You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be very nice if camo validator would accept field with declared type Data values as strings.
Currently we may use numbers or date instances but no date strings.
I think simple Date.parse would suffice to interpret strings.
Why:
I'm using camo (with my neat hack) in a browser (via my own REST client for camo) and after serializing/deserializing JSON objects, all Date fields become ISO date strings on the backend.
The workaround is to: Date.prototype.toJSON = Date.prototype.getTime in the browser.
but I would like to leave Date.prototype.toJSON untouched and allow the camo validators to convert those date strings to Date objects.
The text was updated successfully, but these errors were encountered:
It would be very nice if camo validator would accept field with declared type Data values as strings.
Currently we may use numbers or date instances but no date strings.
I think simple Date.parse would suffice to interpret strings.
Why:
I'm using camo (with my neat hack) in a browser (via my own REST client for camo) and after serializing/deserializing JSON objects, all Date fields become ISO date strings on the backend.
The workaround is to:
Date.prototype.toJSON = Date.prototype.getTime
in the browser.but I would like to leave Date.prototype.toJSON untouched and allow the camo validators to convert those date strings to Date objects.
The text was updated successfully, but these errors were encountered: