{"id":18722402,"url":"https://github.com/nleiva/yangson","last_synced_at":"2026-05-01T12:32:09.573Z","repository":{"id":87031052,"uuid":"83245885","full_name":"nleiva/yangson","owner":"nleiva","description":"Adds and removes indentation to JSON files","archived":false,"fork":false,"pushed_at":"2017-04-11T16:08:24.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-07T20:44:46.752Z","etag":null,"topics":["cisco-ios-xr","golang","json","yang"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nleiva.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-26T22:39:33.000Z","updated_at":"2017-04-11T22:24:31.000Z","dependencies_parsed_at":"2023-05-30T07:15:29.576Z","dependency_job_id":null,"html_url":"https://github.com/nleiva/yangson","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nleiva/yangson","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nleiva%2Fyangson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nleiva%2Fyangson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nleiva%2Fyangson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nleiva%2Fyangson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nleiva","download_url":"https://codeload.github.com/nleiva/yangson/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nleiva%2Fyangson/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32497810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["cisco-ios-xr","golang","json","yang"],"created_at":"2024-11-07T13:41:19.317Z","updated_at":"2026-05-01T12:32:09.540Z","avatar_url":"https://github.com/nleiva.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yangson\n\n## Synopsis\n\nAdd and removes indentation to **YANG** config files **JSON** encoded. \n\n## Code Example\n\n`prettyprint` takes a compact JSON config and pretty prints it.\n- input: [compact JSON](files/bgp.json)\n- output: [pretty printed JSON](files/bgp_formatted.json)\n\n```go\n\tb, err := ioutil.ReadFile(\"files/bgp.json\")\n\tif err != nil {\n\t\tfmt.Print(err)\n\t}\n\n\tb, _ = prettyprint(b)\n```\n\n`unprettyprint` takes an indented JSON config and pretty prints it.\n- input: [pretty printed JSON](files/bgp_formatted.json)\n- output: [compact JSON](files/bgp.json)\n\n```go\n\tb, err := ioutil.ReadFile(\"files/bgp_formatted.json\")\n\tif err != nil {\n\t\tfmt.Print(err)\n\t}\n\n\tb, _ = unprettyprint(b)\n```\n\n## Where are we taking these JSON config files from?\n\n- Check out this great example: [YDK bgp_xr_json](https://github.com/CiscoDevNet/ydk-cpp/tree/master/core/samples/bgp_xr_json)\n- We will include further YDK samples here: [ydk-cpp-samples](ydk-cpp-samples)\n\n## To Do list\n\n- Incorporate commit/push configs on ([github.go](github.go))\n- Add suport to clone or Wget/cURL a config ([github.go](github.go))\n\n\n## See it in action\n\n- [Go Playground](https://play.golang.org/p/TUdaIF_NBp)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnleiva%2Fyangson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnleiva%2Fyangson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnleiva%2Fyangson/lists"}