Skip to content

jceresini/jason

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Tools for working with Jason

Converting to Jason

Example:

from dataclasses import dataclass
from datetime import date
from typing import Optional

from jason import convert_to_jason


@dataclass
class Employee:
    first_name: str
    last_name: str
    date_of_birth: Optional[date] = None


x = Employee(first_name="John", last_name="Doe")

print(x)
print(convert_to_jason(x))

Example output:

Employee(first_name='John', last_name='Doe', date_of_birth=None)
Employee(first_name='Jason', last_name='Doe', date_of_birth=None)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages