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
In C++ 11, it seems that a try / catch is the only way of achieving optional values. This works with singular JSON objects, but as soon as they are included in a JSON array, the optional-ness fails and is the NVP becomes required for all objects in the array. Is there any workaround for this use case?
Daveyjonez
changed the title
Unable to use try / catch optional field with in JSON arrays
C++ 11: Unable to use try / catch optional field with in JSON arrays
Apr 7, 2025
In C++ 11, it seems that a try / catch is the only way of achieving optional values. This works with singular JSON objects, but as soon as they are included in a JSON array, the optional-ness fails and is the NVP becomes required for all objects in the array. Is there any workaround for this use case?
Code to reproduce:
The text was updated successfully, but these errors were encountered: