TheLearningDev's Blog

Follow

TheLearningDev's Blog

Follow

What’s the difference between JSON vs Python Dict?

Bhavani Ravi's photo
Bhavani Ravi
·May 31, 2022·

1 min read

  • JSON keys must be a string but Python dicts can have any immutable type
  • JSON is a wire transfer format, whereas dicts are in-memory data structure
  • JSON is language-agnostic, universal representation whereas dicts are built-in data type of Python
  • JSON as the name suggests is a notation, a rule to represent data in a text file, whereas dicts under the hood is an object with keys and values that are objects
 
Share this