{"id":15089488,"url":"https://github.com/netologist/yaml-object-parser","last_synced_at":"2026-02-21T21:02:00.431Z","repository":{"id":137875481,"uuid":"489027694","full_name":"netologist/yaml-object-parser","owner":"netologist","description":"Customisable Yaml Object Parser","archived":false,"fork":false,"pushed_at":"2022-05-07T17:50:42.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-26T10:08:39.187Z","etag":null,"topics":["golang","golang-library","json","parser","yaml"],"latest_commit_sha":null,"homepage":"","language":"Go","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/netologist.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}},"created_at":"2022-05-05T15:28:07.000Z","updated_at":"2022-08-17T10:48:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"371c172d-c3fe-4407-9649-005f106d5735","html_url":"https://github.com/netologist/yaml-object-parser","commit_stats":null,"previous_names":["hasanozgan/yaml-object-parser"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netologist%2Fyaml-object-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netologist%2Fyaml-object-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netologist%2Fyaml-object-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netologist%2Fyaml-object-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netologist","download_url":"https://codeload.github.com/netologist/yaml-object-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244814893,"owners_count":20514847,"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":["golang","golang-library","json","parser","yaml"],"created_at":"2024-09-25T09:00:35.924Z","updated_at":"2025-10-24T12:46:29.934Z","avatar_url":"https://github.com/netologist.png","language":"Go","readme":"# Yaml Object Parser\n\n### Object Format\n\n```go\ntype Object struct {\n\tName      string\n\tLevel     int\n\tChildren  []*Object\n\tArguments string\n}\n```\n\n### Example Struct\n\n```go\n// set max depth limit\nyop.SetMaxDepthLimit(2)\n\ntype RuleSection struct {\n\tRule *yop.Object `json:\"rule\"`\n}\n\nfunc (t *RuleSection) UnmarshalJSON(b []byte) (err error) {\n\tvar result map[string]json.RawMessage\n\tif err := json.Unmarshal(b, \u0026result); err != nil {\n\t\treturn err\n\t}\n\n\tfor key, value := range result {\n        \n\t\tif key == \"rule\" {\n\t\t\tif t.Rule, err = yop.ParseObjectFromJSON(value); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n```\n\n### Example Yaml File\n\n```yaml\n\nerror-null-object:\n  rule: ~\n\nerror-empty-object:\n  rule: \"\"\n\nerror-not-found:\n  rule: invalid\n\nerror-tree-level-limit-exceeded:\n    rule:\n      and:\n        - or:\n          - and:\n            - or:\n              - and:\n                - or:\n                  - and:\n                    - or:\n                      - and:\n                        - self\n                        - location:\n                            abc: 123\n\nerror-object-list-not-acceptable:\n  rule:\n    - self\n    - location:\n        region: uk\n\nstring-object:\n  rule: test\n\nobject-object:\n  rule:\n    location:\n      region: uk\n\nlist-object:\n  rule:\n    and:\n      - self\n      - location:\n          region: us\n\nnested-object:\n  rule:\n    or:\n      - self\n      - and:\n          - location\n          - time\n\nnested-object-with-object:\n  rule:\n    or:\n      - self\n      - and:\n          - location\n          - opening-hours:\n              opening: 10:00\n              closing: 20:00\n          - relationship:\n              levels:\n                - comprehensive\n                - parent\n\n\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetologist%2Fyaml-object-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetologist%2Fyaml-object-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetologist%2Fyaml-object-parser/lists"}