[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

The differences between json.dumps and json.loads.

On 14Sep2019 02:18, Hongyi Zhao <hongyi.zhao at gmail.com> wrote:
>I'm very confusing on the the differences between json.dumps and
>json.loads.  Any hints?

The direction.

json.dumps takes an object and transcribes it as a string. "Dump to 

json.loads takes a string and decodes it as JSON and returns an object.  
"Load from string".

Cameron Simpson <cs at cskk.id.au> (formerly cs at zip.com.au)