{"id":13498311,"url":"https://github.com/zainfikrih/jsonloader-library","last_synced_at":"2025-03-29T00:34:14.818Z","repository":{"id":132664902,"uuid":"216054300","full_name":"zainfikrih/jsonloader-library","owner":"zainfikrih","description":"📱 Android library to open JSON from assets","archived":false,"fork":false,"pushed_at":"2020-01-31T01:47:12.000Z","size":184,"stargazers_count":30,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-31T15:38:41.214Z","etag":null,"topics":["android","android-library","library"],"latest_commit_sha":null,"homepage":"","language":"Java","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/zainfikrih.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-10-18T15:26:53.000Z","updated_at":"2022-04-30T11:36:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"79fbd3f5-8185-48e9-981e-2be9684ba767","html_url":"https://github.com/zainfikrih/jsonloader-library","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zainfikrih%2Fjsonloader-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zainfikrih%2Fjsonloader-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zainfikrih%2Fjsonloader-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zainfikrih%2Fjsonloader-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zainfikrih","download_url":"https://codeload.github.com/zainfikrih/jsonloader-library/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246122259,"owners_count":20726822,"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":["android","android-library","library"],"created_at":"2024-07-31T21:00:21.865Z","updated_at":"2025-03-29T00:34:14.116Z","avatar_url":"https://github.com/zainfikrih.png","language":"Java","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"[![](https://jitpack.io/v/zainfikrih/jsonloader-library.svg)](https://jitpack.io/#zainfikrih/jsonloader-library)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ab5f6e4c77a0474280b46883ce17092b)](https://www.codacy.com/manual/zainfikrih/jsonloader-library?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=zainfikrih/jsonloader-library\u0026amp;utm_campaign=Badge_Grade)\n[![HitCount](http://hits.dwyl.io/zainfikrih/jsonloader-library.svg)](http://hits.dwyl.io/zainfikrih/jsonloader-library)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-JSONLoader%20Library-orange.svg?style=flat)](https://android-arsenal.com/details/1/7916)\n\n# JSONLoader Library\n![Imgur](https://i.imgur.com/xczU7nd.png)\nA simple Android library to open JSON from assets\n\n## Download\nLatest Version: [![Latest Vesrion](https://jitpack.io/v/zainfikrih/jsonloader-library.svg)](https://jitpack.io/#zainfikrih/jsonloader-library)\n\nGrab the latest dependencies through Gradle, add it to your build.gradle with:\n```gradle\nallprojects {\n\trepositories {\n\t\t...\n\t\tmaven { url 'https://jitpack.io' }\n\t}\n}\n```\nand:\n\n```gradle\ndependencies {\n    implementation 'com.github.zainfikrih:jsonloader-library:{latest version}'\n}\n```\n\n## Usage\nPut the json file in the assets package on the android project (src / main / assets / filename.json).\nFor more information, see [Where do I place the 'assets' folder in Android Studio?](https://stackoverflow.com/questions/18302603/where-do-i-place-the-assets-folder-in-android-studio)\n\nGet JSON as a string:\n```java\nJSONLoader.with(getApplicationContext())\n\t.fileName(\"filename.json\")\n\t.get(new StringLoaderListener() {\n\t    @Override\n\t    public void onResponse(String response) {\n\t\t// response as String\n\t    }\n\n\t    @Override\n\t    public void onFailure(IOException error) {\n\t\t// error\n\t    }\n\t});\n```\n\nGet JSON as JSON Object:\n```java\nJSONLoader.with(getApplicationContext())\n\t.fileName(\"filename.json\")\n\t.getAsJSONObject(new JSONObjectLoaderListener() {\n\t    @Override\n\t    public void onResponse(JSONObject response) {\n\t    \t// response as JSONObject\n\t    }\n\n\t    @Override\n\t    public void onFailure(Exception error) {\n\t\t// error\n\t    }\n\t});\n```\n\nGet JSON as JSON Array:\n```java\nJSONLoader.with(getApplicationContext())\n\t.fileName(\"filename.json\")\n\t.getAsJSONArray(new JSONArrayLoaderListener() {\n\t    @Override\n\t    public void onResponse(JSONArray response) {\n\t\t// response ad JSONArray\n\t    }\n\n\t    @Override\n\t    public void onFailure(Exception error) {\n\t\t// error\n\t    }\n\t});\n```\n\nFor some examples, see the sample App.\n\n## Contributors ✨\n\u003ca href=\"https://github.com/zainfikrih/jsonloader-library/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contributors-img.firebaseapp.com/image?repo=zainfikrih/jsonloader-library\" /\u003e\n\u003c/a\u003e\n\n## License\n```license\nCopyright 2019 Zain Fikri H\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 of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\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```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzainfikrih%2Fjsonloader-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzainfikrih%2Fjsonloader-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzainfikrih%2Fjsonloader-library/lists"}