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
Currently, Value.from converts all JS arrays into ion.dom.Lists and all Uint8Arrays into ion.dom.Blobs. Users hoping to create ion.dom.SExpression or ion.dom.Clob have to instantiate them manually, which is much more tedious.
We should modify Value.from to accept an optional expected type hint. This is trivial for handling the top level value:
However, it's unclear how to specify the expected outcome of converting nested JS values. Would the expectedType hint apply to ALL Arrays and Uint8Arrays encountered during conversion? Is there a better API?
The text was updated successfully, but these errors were encountered:
Similarly I was hoping to be able to say ion.dom.Value.from(IonTypes.Date, "2021-01-1") and have the library convert the date string into an Ion date value.
Currently,
Value.from
converts all JS arrays intoion.dom.List
s and allUint8Array
s intoion.dom.Blob
s. Users hoping to createion.dom.SExpression
orion.dom.Clob
have to instantiate them manually, which is much more tedious.We should modify
Value.from
to accept an optional expected type hint. This is trivial for handling the top level value:However, it's unclear how to specify the expected outcome of converting nested JS values. Would the
expectedType
hint apply to ALLArray
s andUint8Array
s encountered during conversion? Is there a better API?The text was updated successfully, but these errors were encountered: