Skip to main content

JSON Dataclass Object Mapper

Project description

#JSONUT jsonut can be used to convert json objects to Python data class objects and vice versa.

How to Use

Example

from dataclasses import dataclass, field
from typing import *

import jsonut

# Sample Dataclass Object
@dataclass
class SampleObject(jsonut.JsonSerializable):
    name: str = field(default_factory=str)
    numbers: List[int] = field(default_factory=list)

    def __eq__(self, other):
        if not isinstance(other, self.__class__):
            return False

        if self.name != other.name:
            return False

        if self.numbers != other.numbers:
            return False

        return True


# Create an object
# sample_obj = create_sample_object()

# Serialization
serialized = serialize(sample_obj)

# Deserialization
deserialized = deserialize(serialized)

How to Deploy to PyPI

refer with: https://packaging.python.org/tutorials/packaging-projects/

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

jsonut-0.1.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

jsonut-0.1.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file jsonut-0.1.0.tar.gz.

File metadata

  • Download URL: jsonut-0.1.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/51.1.0.post20201221 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for jsonut-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5d80f8f618f7462ed935c5f926aa448ae1b4f7e864331bace24aa13b287ef71a
MD5 8a4173b03a4ed86b6cfc7b77fb825599
BLAKE2b-256 267d41e1687d782602e797828f91c6ffc80eee7b27080d02dfa28aa999e33519

See more details on using hashes here.

File details

Details for the file jsonut-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: jsonut-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/51.1.0.post20201221 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for jsonut-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef7dc7b7660b6a22be14d5aef130e718d516e64d1e7cff838ad3c100222c7366
MD5 40ae0f4cdaff1f9752346c5152eca6db
BLAKE2b-256 50910b991a7b3a85b9fbc18c59e161973050606e61ca278d265ecd8fd8ea8a8a

See more details on using hashes here.

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