{"id":20010106,"url":"https://github.com/cxa/bs-json-keypather","last_synced_at":"2025-09-11T13:33:57.833Z","repository":{"id":57105109,"uuid":"125982070","full_name":"cxa/bs-json-keypather","owner":"cxa","description":"Navigate JSON with keypath for BuckleScript","archived":false,"fork":false,"pushed_at":"2018-06-26T17:20:12.000Z","size":51,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T09:44:41.910Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"OCaml","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/cxa.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-03-20T08:06:26.000Z","updated_at":"2018-11-26T02:44:15.000Z","dependencies_parsed_at":"2022-08-20T23:20:43.097Z","dependency_job_id":null,"html_url":"https://github.com/cxa/bs-json-keypather","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cxa%2Fbs-json-keypather","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cxa%2Fbs-json-keypather/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cxa%2Fbs-json-keypather/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cxa%2Fbs-json-keypather/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cxa","download_url":"https://codeload.github.com/cxa/bs-json-keypather/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241447526,"owners_count":19964314,"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":[],"created_at":"2024-11-13T07:18:28.841Z","updated_at":"2025-03-02T01:44:47.282Z","avatar_url":"https://github.com/cxa.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSON Keypath Navigator for BuckleScript\n\nNavigate JSON with keypath.\n\n## Basic usage\n\nAdd `@cxa/bs-json-keypather` to your dependencies, and configure your `bsconfig.json` like:\n\n```json\n{\n  \"bs-dependencies\": [\"@cxa/bs-json-keypather\"]\n}\n```\n\nFor this JSON:\n\n```json\n{\n  \"title\": { \"main\": \"Bs_json_keypather\", \"sub\": \"is awesome\" },\n  \"version\": { \"major\": 1, \"minor\": 2 },\n  \"version_float\": 1.2,\n  \"production_ready\": true,\n  \"reason\": null,\n  \"arr\": [4, 5, 6]\n}\n```\n\nYou can navigate main title with `Bs_json_keypather.string_for \"title.main\" json`. More:\n\n```ocaml\nval json_for : Js.String.t -\u003e Js.Json.t -\u003e (Js.Json.t, error) Belt.Result.t\nval value_for :\n  Js.String.t -\u003e\n  Js.Json.t -\u003e (Js.Json.t -\u003e 'a option) -\u003e ('a, error) Belt.Result.t\nval bool_for : Js.String.t -\u003e Js.Json.t -\u003e (bool, error) Belt.Result.t\nval string_for : Js.String.t -\u003e Js.Json.t -\u003e (Js.String.t, error) Belt.Result.t\nval float_for : Js.String.t -\u003e Js.Json.t -\u003e (float, error) Belt.Result.t\nval int_for : Js.String.t -\u003e Js.Json.t -\u003e (int, error) Belt.Result.t\nval object_for :\n  Js.String.t -\u003e Js.Json.t -\u003e (Js.Json.t Js.Dict.t, error) Belt.Result.t\nval array_for :\n  Js.String.t -\u003e Js.Json.t -\u003e (Js.Json.t array, error) Belt.Result.t\nval is_null_for : Js.String.t -\u003e Js.Json.t -\u003e bool\n```\n\n## Advance usage\n\nUse your favorite `Result` type e.g. `CCResult` with functor `Bs_json_keypather_impl.Make`.\n\n```ocaml\nmodule My_json_keypather =\n  Bs_json_keypather_impl.Make(CCResult)\n```\n\n## Development\n\n* `npm run/yarn watch`\n* `npm run/yarn test`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcxa%2Fbs-json-keypather","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcxa%2Fbs-json-keypather","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcxa%2Fbs-json-keypather/lists"}