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
I'm trying to deserialize some JSON where one of the fields can be any valid JSON value. As one example, I want both of the following JSON strings to deserialize to the same struct:
{
"string_or_number": "1.5"
}
{
"string_or_number": 1.5
}
Using serde_json I would represent string_or_number as type value::Value, and using miniserde I would represent it as type json::Value.
Is there an equivalent type I can use in nanoserde?
The text was updated successfully, but these errors were encountered:
I'm trying to deserialize some JSON where one of the fields can be any valid JSON value. As one example, I want both of the following JSON strings to deserialize to the same struct:
Using
serde_json
I would representstring_or_number
as typevalue::Value
, and usingminiserde
I would represent it as typejson::Value
.Is there an equivalent type I can use in
nanoserde
?The text was updated successfully, but these errors were encountered: