{"id":37019774,"url":"https://github.com/piotrkot/oojson","last_synced_at":"2026-01-14T02:12:37.810Z","repository":{"id":57722122,"uuid":"157380275","full_name":"piotrkot/oojson","owner":"piotrkot","description":"Object-oriented JSON. Wrapper for JSON-P","archived":false,"fork":false,"pushed_at":"2024-11-01T15:23:45.000Z","size":123,"stargazers_count":1,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-21T14:03:25.180Z","etag":null,"topics":["json","oop"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/piotrkot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-13T12:55:30.000Z","updated_at":"2024-11-01T15:23:49.000Z","dependencies_parsed_at":"2022-08-29T23:00:38.620Z","dependency_job_id":null,"html_url":"https://github.com/piotrkot/oojson","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/piotrkot/oojson","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotrkot%2Foojson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotrkot%2Foojson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotrkot%2Foojson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotrkot%2Foojson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piotrkot","download_url":"https://codeload.github.com/piotrkot/oojson/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotrkot%2Foojson/sbom","scorecard":{"id":734774,"data":{"date":"2025-08-11","repo":{"name":"github.com/piotrkot/oojson","commit":"996b0adeffb2ecd2a35c27572d764350d896ac3f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/19 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 20 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T15:27:38.002Z","repository_id":57722122,"created_at":"2025-08-22T15:27:38.003Z","updated_at":"2025-08-22T15:27:38.003Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","oop"],"created_at":"2026-01-14T02:12:37.004Z","updated_at":"2026-01-14T02:12:37.802Z","avatar_url":"https://github.com/piotrkot.png","language":"Java","readme":"[![Build Status](https://travis-ci.org/piotrkot/oojson.svg?branch=master)](https://travis-ci.org/piotrkot/oojson)\n[![Coverage Status](https://coveralls.io/repos/github/piotrkot/oojson/badge.svg?branch=master)](https://coveralls.io/github/piotrkot/oojson?branch=master)\n\n# Object-oriented Java API for JSON\n\nSimple object-oriented Java API for JSON transformation. It is a wrapper around\n[JSON-P](https://javaee.github.io/jsonp/).\n\n## Creating JSON arrays\n\nFrom values\n\n```java\nnew JsonArr\u003c\u003e(\n    true,\n    \"a\",\n    1,\n    new JsonArr(),\n    new JsonObj()\n);\n```\n\nor from a string\n\n```java\nnew JsonArr(\n    new StringReader(\"[false,\\\"x\\\",1,[],{}]\")\n);\n```\n\nor from JSON-P array\n\n```java\nnew JsonArr\u003c\u003e(\n    Json.createArrayBuilder().add(0).build()\n);\n```\n\n## Creating JSON objects\n\nFrom object attributes\n\n```java\nnew JsonObj(\n    new Attr\u003c\u003e(\"bool\", true),\n    new Attr\u003c\u003e(\"str\", \"a\"),\n    new Attr\u003c\u003e(\"num\", 0),\n    new Attr\u003c\u003e(\"arr\", new JsonArr()),\n    new Attr\u003c\u003e(\"obj\", new JsonObj())\n);\n```\n\nor from a string\n\n```java\nnew JsonObj(\n    new StringReader(\n        \"{\\\"bool\\\":false,\\\"str\\\":\\\"A\\\",\\\"num\\\":1,\\\"arr\\\":[],\\\"obj\\\":{}}\"\n    )\n);\n```\n\nor from JSON-P object\n\n```java\nnew JsonObj(\n    Json.createObjectBuilder().add(\"name\", \"John\").build()\n);\n```\n\n## Transforming JSON arrays (with help of [Cactoos](http://www.cactoos.org/) library)\n\nIn the example, numerical values are filtered and mapped to string values\n\n```java\nJsonArr\u003cInteger\u003e array = new JsonArr\u003c\u003e(\n    10,\n    20\n);\nnew JsonArr\u003c\u003e(\n    new Mapped\u003c\u003e(\n        elem -\u003e elem + \" points\",\n        new Filtered\u003c\u003e(\n            elem -\u003e elem \u003e 15,\n            array.value()\n        )\n    )\n);\n```\n\nThe result is array `[\"20 points\"]`.\n\n## Making JSON objects fit\n\nIn the example, value of `num` attribute is multiplied by 2.\n\n```java\nJsonObj object = new JsonObj(\n    new Attr\u003c\u003e(\"str\", \"A\"),\n    new Attr\u003c\u003e(\"num\", 1)\n);\nnew FitValUpd(\n    \"num\",\n    (object.\u003cInteger\u003eget(\"num\")) * 2\n).make(object);\n```\n\nThe result is object `{\"str\":\"A\",\"num\":2}`.\n\nIn the example, attribute with name `delete` is removed and attribute\nwith name `info` is replaced with attribute `\"moreInfo\"` and value `true`.\n\n```java\nJsonObj object = new JsonObj(\n    new Attr\u003c\u003e(\"delete\", \"private\"),\n    new Attr\u003c\u003e(\"info\", \"public info\")\n);\nnew FitChain\u003c\u003e(\n    new FitAttrDel(\"delete\"),\n    new FitAttrRepl(\"info\", new Attr\u003c\u003e(\"moreInfo\", true))\n).make(object);\n```\n\nThe result is object `{\"moreInfo\":true}`.\n\nLibrary supports [JSON specification](https://json.org/).\n\nTo get started, add dependency to your project:\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.piotrkot\u003c/groupId\u003e\n    \u003cartifactId\u003eoojson\u003c/artifactId\u003e\n    \u003cversion\u003e2.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nYou may need to add [JSON-P](https://javaee.github.io/jsonp/) dependency:\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ejakarta.json\u003c/groupId\u003e\n    \u003cartifactId\u003ejakarta.json-api\u003c/artifactId\u003e\n    \u003cversion\u003e2.1.3\u003c/version\u003e\n    \u003cscope\u003eprovided\u003c/scope\u003e\n\u003c/dependency\u003e\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.eclipse.parsson\u003c/groupId\u003e\n    \u003cartifactId\u003eparsson\u003c/artifactId\u003e\n    \u003cversion\u003e1.1.7\u003c/version\u003e\n    \u003cscope\u003eruntime\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\nFeel free to fork me on GitHub, report bugs or post comments.\n\nFor Pull Requests, please run `mvn clean package`, first.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiotrkot%2Foojson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiotrkot%2Foojson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiotrkot%2Foojson/lists"}