{"id":23108568,"url":"https://github.com/venryx/vdf","last_synced_at":"2025-04-03T23:14:20.565Z","repository":{"id":89346762,"uuid":"53447434","full_name":"Venryx/VDF","owner":"Venryx","description":"Like JSON, but with type metadata, indent-based children, and a rich tagging and override system. (versions in C# and TS/JS)","archived":false,"fork":false,"pushed_at":"2017-02-24T19:17:21.000Z","size":14195,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T05:35:06.953Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Venryx.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-08T21:43:48.000Z","updated_at":"2017-01-01T11:49:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"0c0892dc-ba5b-469e-a572-be2e054fd581","html_url":"https://github.com/Venryx/VDF","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/Venryx%2FVDF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Venryx%2FVDF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Venryx%2FVDF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Venryx%2FVDF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Venryx","download_url":"https://codeload.github.com/Venryx/VDF/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247092393,"owners_count":20882218,"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-12-17T01:28:02.454Z","updated_at":"2025-04-03T23:14:20.540Z","avatar_url":"https://github.com/Venryx.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VDF\n###### Like JSON, but with type metadata, indent-based children, and a rich tagging and override system. (versions in C# and TS/JS)\n\nThe entire serializer/deserializer system is contained in 6 files, and is implemented in two languages (C# and TS/JS) using almost exactly the same structure. (so it's easy to update one alongside the other)\n\n#### Features\n++++++++++\n##### Type Metadata\nVDF:\n```\nList(object)\u003e[Color\u003e\"Blue\" double\u003e0 int\u003e\"1050\"]\n```\nUnit test:\n```\nvar list = (List\u003cobject\u003e)VDF.Deserialize(\"[...]\"));\nlist[0].Should().Be(Color.Blue);\nlist[1].Should().Be(0d);\nlist[2].Should().Be(1050);\n```\n\n##### Indent-Based Children (i.e. 'popped out' contents)\nVDF:\n```\n{^}   ;; This is a comment. To the left, brackets mark start and end of object, and '^' marks the object's content as 'popped out', i.e. its properties laid out on the lines below it, with indentation.\n\tterrain:{size:Vector2\u003e\"100 100\"}\n\tregions:[^]   ;; Same thing here for a list, except its items are laid out below, rather than its properties.\n\t\t{name:\"Grass\" soil:\"Grass\" enabled:true}\n\t\t{name:\"Dirt\" soil:\"Dirt\" enabled:true}\n\tstructures:[^]\n\t\t{^}\n\t\t\tobjectType:\"Palisade Wall\"\n\t\t\towner:Player\u003e\"Andy\"\n\t\t\tposition:\"63 97 4\"   ;; You don't need to specify a type here (e.g. \"Vector3\u003e\"), since prop is already declared as Vector3 in C#. You can if you want, though. (e.g. for a derived type)\n\t\t\tcanBeRotated:true\n\tunits:[^]\n\t\t{^}\n\t\t\tobjectType:\"Wolf\"\n\t\t\towner:Player\u003e\"Andy\"\n\t\t\tcanBeDrafted:{^}\n\t\t\t\tdraftTime:1\n\t\t\t\tundraftTime:1\n\t\t{^}\n\t\t\tobjectType:\"Zebra\"\n\t\t\towner:Player\u003e\"Bob\"\n\t\t\tcanBeDrafted:{^}\n\t\t\t\tdraftTime:2\n\t\t\t\tundraftTime:2\n```\nUnit test:\n```\nvar map = VDF.Deserialize\u003cMap\u003e(\"[...]\");\nmap.terrain.size.Should().Be(new Vector2(100, 100));\nmap.regions[0].soil.GetType().Should().Be(typeof(Soil));\nmap.structures[0].position.GetType().Should().Be(typeof(Vector3));\nmap.units[1].owner.name.Should().Be(\"Bob\");\nmap.units[1].canBeDrafted.draftTime.Should().Be(2);\n```\n\n##### Tagging and Override System\n```\nTODO\n```\n\n### Info\nAuthor: Stephen Wicklund (Venryx)  \nLanguage: C#  \nCode: Open source (GPLv3) at: http://github.com/Venryx/VDF","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvenryx%2Fvdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvenryx%2Fvdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvenryx%2Fvdf/lists"}