I want json to be true [closed]

Asked 2 years ago, Updated 2 years ago, 20 views

Do you want to improve this question?Edit your post to clarify the issue you are trying to resolve by adding details.

Closed 4 years ago.

4 years ago
json={"Hi":true}

I would like to make this Hi true to be able to perform logical operations.

python

2022-09-30 19:37

1 Answers

You can convert to Python objects using json.dumps.

>>import json
>>>d=json.loads('{"Hi":true}')
>>d
{'Hi': True}


2022-09-30 19:37

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.