Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kougen/jsonservice
An easy to use JSON Service for python, which can handle complex data structures.
https://github.com/kougen/jsonservice
json jsonserializer package pip python
Last synced: about 1 month ago
JSON representation
An easy to use JSON Service for python, which can handle complex data structures.
- Host: GitHub
- URL: https://github.com/kougen/jsonservice
- Owner: kougen
- Created: 2024-03-22T21:31:02.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-07T14:50:25.000Z (9 months ago)
- Last Synced: 2024-10-13T01:48:18.276Z (3 months ago)
- Topics: json, jsonserializer, package, pip, python
- Language: Python
- Homepage: https://pypi.org/project/jsonservice/
- Size: 22.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JSON Service for Python
Makes it easy to read and write JSON files in Python.
It supports complex nested data structures and is very easy to use.## Installation
```bash
pip install jsonservice
```## Usage
```py
from jsonservice import JsonService# Create a new JSON Service (creates a new file if it doesn't exist)
json_service = JsonService('data.json')# Create a new JSON Service (will throw an error if the file doesn't exist)
json_service2 = JsonService('data2.json', create_file_if_not_exists=False)# Creates a 'settings' object in the JSON file with a 'lights' property set to 'on'
json_service.write("settings.lights", "on")
```