r/PythonLearning • • Feb 22 '26

JSON vs TOON

Post image

Anyone have thoughts on this?

What’s your opinion on using a Toon-style JSON approach? Curious to hear different perspectives and real-world experiences.

1.3k Upvotes

167 comments sorted by

View all comments

Show parent comments

1

u/its_a_gibibyte Feb 26 '26

What about just JSON in a better layout:

{
 "Columns": ["id","name","role"],
  "data": [
    [1, "Alice", "admin"]
    [2, "Bob", "user"]
  ]
}

1

u/kozeljko Feb 26 '26

Why is "data" not aligned with "Columns" 🤢

1

u/its_a_gibibyte Feb 26 '26

Sure, you could also do:

{
  "data": [
    ["id","name","role"],
    [1, "Alice", "admin"],
    [2, "Bob", "user"]
  ]
}

1

u/robhanz Feb 26 '26

Eh I prefer the explicit columns element. That way there’s no “magic” row in the data collection you have to remember.