by justsomeuser · 3y ago · 0 comments
Most typed languages give you two options for parsing JSON:
- 1. General JSON values (hash maps of JSON scalar values).
- 2. Strongly typed - convert JSON string to a specific type that you defined in your application code.
You could use 1 to then use in a switch statement to branch to 2.
You may have to parse the JSON twice in some languages to do this, but JSON is typically small and fast to parse.
No comments yet.