{"id":19263645,"url":"https://github.com/soundvibe/jkob","last_synced_at":"2025-04-21T18:31:44.434Z","repository":{"id":57737771,"uuid":"94520622","full_name":"soundvibe/jkob","owner":"soundvibe","description":"Simple type-safe json builder ","archived":false,"fork":false,"pushed_at":"2018-06-07T20:31:01.000Z","size":33,"stargazers_count":10,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-01T15:11:50.719Z","etag":null,"topics":["builder","dsl","json","kotlin"],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soundvibe.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":"2017-06-16T08:03:30.000Z","updated_at":"2022-06-17T17:58:58.000Z","dependencies_parsed_at":"2022-08-24T15:00:42.538Z","dependency_job_id":null,"html_url":"https://github.com/soundvibe/jkob","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soundvibe%2Fjkob","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soundvibe%2Fjkob/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soundvibe%2Fjkob/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soundvibe%2Fjkob/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soundvibe","download_url":"https://codeload.github.com/soundvibe/jkob/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250111017,"owners_count":21376571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["builder","dsl","json","kotlin"],"created_at":"2024-11-09T19:36:24.554Z","updated_at":"2025-04-21T18:31:44.099Z","avatar_url":"https://github.com/soundvibe.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jkob\n[![Build Status](https://travis-ci.org/soundvibe/jkob.svg)](https://travis-ci.org/soundvibe/jkob)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.soundvibe/jkob/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.soundvibe/jkob)\n\n### Kotlin DSL for type-safe JSON building\n\n##### An example of building JSON:\n```kotlin\nval json = json {\n    \"id\" to \"value\" //key-\u003evalue pair\n    \"name\" to \"foo\"\n    \"items\" [\"value1\", \"value2\", \"value3\"] //array\n    for (i in 1..2) \"item$i\" to i //you can even use regular loops when building JSON\n    \"numbers\" [1, 2, 3]\n    \"child\" { //child object\n        \"age\" to 19\n        \"isValid\" to false\n        \"isNull\" to null\n    }\n}\n```\nThis JSON object representation can be converted to JSON string:\n```kotlin\nval jsonString = json.toString()\n```\nOutput:\n```javascript\n{\"id\": \"value\", \"name\": \"foo\", \"items\": [\"value1\", \"value2\", \"value3\"], \"item1\": 1, \"item2\": 2, \"numbers\": [1, 2, 3], \"child\": {\"age\": 19, \"isValid\": false, \"isNull\": null}}\n```\n\n##### An example to retrieve elements from JSON:\n```kotlin\nval numbers = json[\"numbers\"]?.toList\u003cInt\u003e()\nprintln(numbers) //prints [1, 2, 3]\n```\n\n\n## Binaries\n\n\nBinaries and dependency information for Maven, Ivy, Gradle and others can be found at [http://search.maven.org](http://search.maven.org/#search%7Cga%7C1%7Cnet.soundvibe.reacto).\n\nExample for Gradle:\n\n```groovy\ncompile 'net.soundvibe:jkob:1.0.0'\n```\n\nand for Maven:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003enet.soundvibe\u003c/groupId\u003e\n    \u003cartifactId\u003ejkob\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n\n## Bugs and Feedback\n\nFor bugs, questions and discussions please use the [Github Issues](https://github.com/soundvibe/jkob/issues).\n\n## LICENSE\n\nCopyright 2017 Linas Naginionis\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy to the License at\n\n\u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoundvibe%2Fjkob","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoundvibe%2Fjkob","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoundvibe%2Fjkob/lists"}