- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How we can convert Python objects into JSON objects?
Suppose we have a list object a = [1,2,3]. We convert a python object into a JSON object by importing json module and using the method json.dumps() as follows.
>>> a = [1,2,3] >>> import json >>> json.dumps(a) '[1, 2, 3]'
The JSON object we got is '[1, 2, 3]'
- Related Articles
- How can we merge two JSON objects in Java?
- How can we write JSON objects to a file in Java?
- How to decode JSON into objects in Golang?
- How can I filter JSON data with multiple objects?
- How can we see non luminous objects?
- How to convert dictionary into list of JavaScript objects?
- How can I convert a bytes array into JSON format in Python?
- How to parse JSON Objects on Android?
- How Can You Copy Objects in Python?
- How to access nested json objects in JavaScript?
- How to convert JSON data into a Python tuple?
- How to convert JSON data into a Python object?
- How to access Python objects within objects in Python?
- How can we convert a JSON string to a JSON object in Java?
- Convert an array of objects into plain object in JavaScript

Advertisements