Skip to main content

A Python library for serializing and deserializing complex objects to and from JSON

Project description

JSerPy

JSerPy is a Python library for serializing and deserializing complex objects to and from JSON. It provides robust support for handling various Python types including dataclasses, enums, numpy arrays, and custom objects.

Installation

You can install the package directly from GitHub:

pip install git+https://github.com/ronpik/jserpy.git

Usage

Here's a simple example of how to use JSerPy:

from dataclasses import dataclass
from jserpy import serialize_json, deserialize_json

@dataclass
class Person:
    name: str
    age: int

# Create an instance
person = Person(name="John", age=30)

# Serialize to JSON
json_str = serialize_json(person)

# Deserialize back to object
restored_person = deserialize_json(json_str, Person)

assert person == restored_person

Features

  • Supports serialization of complex Python objects
  • Handles dataclasses, enums, numpy arrays, and custom objects
  • Type-safe deserialization
  • Customizable serialization behavior

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jserpy-0.1.3.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jserpy-0.1.3-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file jserpy-0.1.3.tar.gz.

File metadata

  • Download URL: jserpy-0.1.3.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for jserpy-0.1.3.tar.gz
Algorithm Hash digest
SHA256 55fa09d6dfa633b9e089c55980aabcd2ad1d5467644ad3baf157c7ef524b5d96
MD5 3e131425c54b0681335adb1222af93ba
BLAKE2b-256 b2f3d49a1bdcd74c3a3d7b63b2b36705aa8273c8f4f80275083cd1f23783bfa5

See more details on using hashes here.

Provenance

The following attestation bundles were made for jserpy-0.1.3.tar.gz:

Publisher: python-publish.yml on ronpik/jserpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jserpy-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: jserpy-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for jserpy-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1b8b73c35fdba3b965db6dae2f8a5919eefe6c571bdba440c626d60c73abae93
MD5 ff985d377cfb3b736f0c368ebe498404
BLAKE2b-256 c9b287e49461346ca6ef3554ca9b781fb8402b9ddff8edde026ce52c670c39d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for jserpy-0.1.3-py3-none-any.whl:

Publisher: python-publish.yml on ronpik/jserpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page