{ "info": { "author": "Kevin Zimmerman", "author_email": "kevin.zimmerman@thomsonreuters.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "Overview\n========\n\nJs2model makes it easy to use JSON data as plain old Objective C, C++, or Python objects.\n\nJSON is as a data protocol is simple, convenient, ubiquitous. When working in Javascript, a valid JSON string can be\nsimply eval'ed to yield a native data instance. When working in other languages, things are not as simple. The usual\napproach is to use a general language-specific JSON parser which yields a generalized data structure composed of\ndictionaries, arrays, string and numbers. You can use these general structures, at the cost of decreased efficiency,\nno type safety, harder code maintainability, etc. You can regain efficiency, type safety, etc by hand rolling some\npost-processing logic to load the data into native, custom class instances - a task that is usually tedious,\nbug prone, and hard to maintain.\n\nJs2model addresses the aforementioned shortcomings of typical JSON deserialization approaches by automatically\ngenerating model classes and serialization/deserialization code. Js2model uses the\n`JSON Schema `_ definition of your JSON data to generate source\nfiles which you include and build with the rest of your project.\n\nLanguages\n=========\n\nThe script is designed to target multiple output languages. Objective-C and C++ are supported out of the box.\nFuture versions will add additional languages, as well as support for adding your own language templates.\n\nDocumentation\n=============\n\nYou can review the documentation `here `_\n\nJSON Schema\n===========\n\nChances are you do not have existing JSON Schema definitions for your JSON data. Theoretically, creating a schema is\nsimply a matter of creating JSON file per the `JSON Schema specifications `_.\nRealistically, creating a schema definition manually can be tedious and time intensive, depending on the complexity of your\ndata. Luckily, there is a better way. `GenSON `_ is a script that\nwill automatically generate JSON Schema from one or more JSON files. The resulting schema definitions may need some tweaking,\nbut GenSON will save you considerable time and effort.\n\nUsage\n=====\n\n::\n\n usage: js2model [-h] [-l LANG] [--prefix PREFIX] [--namespace NAMESPACE]\n [--rootname ROOTNAME] [--novalidate] [-o OUTPUT]\n [--implements IMPLEMENTS] [--super SUPER]\n [--import IMPORT_FILES] [-v] [--no-deserialize]\n [--no-dependencies]\n FILES [FILES ...]\n\n Generate native data models from JSON Schema definitions.\n\n positional arguments:\n FILES JSON Schema files for model generation\n\n optional arguments:\n -h, --help show this help message and exit\n -l LANG, --lang LANG Target language. Supported values: objc, cpp (default:\n objc)\n --prefix PREFIX prefix for class names (default: TR)\n --namespace NAMESPACE\n parent namespace for generated code (default: tr)\n --rootname ROOTNAME Class name for root schema object (default: base name\n of file)\n --novalidate Skip schema validation\n -o OUTPUT, --output OUTPUT\n Target directory of output files\n --implements IMPLEMENTS\n Comma separated list of interface(s)|protocol(s)\n supported by the generated classes\n --super SUPER Comma separated list of super classes. Generated\n classes inherit these\n --import IMPORT_FILES\n Comma separated list of files to @import for Objective\n C source files.\n -v, --verbose Print actions to STDOUT.\n --no-deserialize Do not generate deserialization code. Implies --no-\n dependencies.\n --no-dependencies Do not include dependencies in output.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/thomsonreuters/js2model", "keywords": "json,schema,jsonschema,json-schema,json schema,json object,generate,generator,builder,draft 4", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "js2model", "package_url": "https://pypi.org/project/js2model/", "platform": "any", "project_url": "https://pypi.org/project/js2model/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/thomsonreuters/js2model" }, "release_url": "https://pypi.org/project/js2model/0.3.dev11/", "requires_dist": null, "requires_python": null, "summary": "Auto-generate plain old object models + custom JSON serialization/deserialization code from JSON schema definitions.", "version": "0.3.dev11" }, "last_serial": 1842655, "releases": { "0.2.dev11": [ { "comment_text": "", "digests": { "md5": "ee6bde347a524f61166490c085696dfe", "sha256": "f047d1615cfa672c33bf41bdb71390cb57f19b971c799f8ee0b3de05d1efb20b" }, "downloads": -1, "filename": "js2model-0.2.dev11.tar.gz", "has_sig": false, "md5_digest": "ee6bde347a524f61166490c085696dfe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 88958, "upload_time": "2015-12-02T00:50:22", "url": "https://files.pythonhosted.org/packages/69/51/418a871263a2e94088629e0f46b8787bf77de303dcd0a62271ebc678c1ca/js2model-0.2.dev11.tar.gz" } ], "0.3.dev11": [ { "comment_text": "", "digests": { "md5": "3737553d154869045fc4e70da3069377", "sha256": "e9cda93d0355d0166127d5d1e7147e88765dbbfdc064181764af8feba8e81113" }, "downloads": -1, "filename": "js2model-0.3.dev11.tar.gz", "has_sig": false, "md5_digest": "3737553d154869045fc4e70da3069377", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 88966, "upload_time": "2015-12-02T01:57:06", "url": "https://files.pythonhosted.org/packages/a0/6b/52b1b702f85257699358bd29e04225c90591a13a8b642b4cbec4f93ece9e/js2model-0.3.dev11.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3737553d154869045fc4e70da3069377", "sha256": "e9cda93d0355d0166127d5d1e7147e88765dbbfdc064181764af8feba8e81113" }, "downloads": -1, "filename": "js2model-0.3.dev11.tar.gz", "has_sig": false, "md5_digest": "3737553d154869045fc4e70da3069377", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 88966, "upload_time": "2015-12-02T01:57:06", "url": "https://files.pythonhosted.org/packages/a0/6b/52b1b702f85257699358bd29e04225c90591a13a8b642b4cbec4f93ece9e/js2model-0.3.dev11.tar.gz" } ] }