{"id":21490,"library":"jsonasobj","title":"jsonasobj","description":"A Python library for treating JSON data as Python objects, providing dict-like access with attribute-style syntax. Current version is 1.3.1 (stable) with v2.0.x pre-releases introducing breaking changes. Development is ongoing with pre-release versions.","status":"active","version":"1.3.1","language":"python","source_language":"en","source_url":"https://github.com/hsolbrig/jsonasobj","tags":["json","object","attribute-access","dict"],"install":[{"cmd":"pip install jsonasobj","lang":"bash","label":"Install stable version"},{"cmd":"pip install jsonasobj==2.0.2dev4","lang":"bash","label":"Install latest pre-release"}],"dependencies":[{"reason":"Used for Python 2/3 compatibility in version 1.x","package":"six","optional":false}],"imports":[{"note":"v2 renamed the package; v1 uses jsonasobj, v2 uses jsonasobj2","wrong":"from jsonasobj2 import JsonObj","symbol":"JsonObj","correct":"from jsonasobj import JsonObj"}],"quickstart":{"code":"from jsonasobj import JsonObj\n\ndata = JsonObj(name=\"test\", count=42)\nprint(data.name)  # test\nprint(data['count'])  # 42","lang":"python","description":"Basic usage creating a JsonObj and accessing attributes."},"warnings":[{"fix":"Import from jsonasobj2 instead of jsonasobj, or pin to v1.3.1 for compatibility.","message":"Version 2 pre-releases (jsonasobj2) introduce a new package name and are not backwards compatible.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Upgrade to Python 3 and use latest version.","message":"Python 2 support is deprecated in v1.3.x and completely removed in v2.","severity":"deprecated","affected_versions":"<2.0.0"},{"fix":"Use dict-style assignment (obj['key'] = value) to keep dict and attribute in sync.","message":"JsonObj inherits from dict, but setting attributes via dot notation does not update the underlying dict keys.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use `from jsonasobj import JsonObj` for v1.x, or install v2 pre-release with `pip install jsonasobj==2.0.2dev4` and import from jsonasobj2.","cause":"Trying to import v2 under v1 package name.","error":"ModuleNotFoundError: No module named 'jsonasobj2'"},{"fix":"Use `JsonObj(json.loads(json_string))` instead.","cause":"The method 'from_json' does not exist; a class method for construction from JSON string may have been removed.","error":"AttributeError: 'JsonObj' object has no attribute 'from_json'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}