Search
ctrl/
Ask AI
Light
Dark
System

Scalars

Subtopics

As was previously mentioned, only bytes cannot be cast into json. However, arrays and tuples can be cast into json just fine, even if they contain other nested structures. Regular tuples and arrays both become JSON arrays, but named tuples become JSON Objects. Try the following cast of a complex nested structure:

Input
Run
Output Objects
Press the 'Run' button to evaluate the input