{"id":21162716,"url":"https://github.com/tmcdos/tiny-json","last_synced_at":"2026-01-02T05:32:34.771Z","repository":{"id":45834723,"uuid":"84344976","full_name":"tmcdos/tiny-json","owner":"tmcdos","description":"JSON library for Delphi","archived":false,"fork":false,"pushed_at":"2017-12-18T10:49:24.000Z","size":44,"stargazers_count":15,"open_issues_count":0,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-21T09:48:30.909Z","etag":null,"topics":["delphi7","json-library"],"latest_commit_sha":null,"homepage":"","language":"Pascal","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/tmcdos.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":"2017-03-08T16:57:05.000Z","updated_at":"2024-11-15T02:15:34.000Z","dependencies_parsed_at":"2022-09-05T04:31:02.150Z","dependency_job_id":null,"html_url":"https://github.com/tmcdos/tiny-json","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/tmcdos%2Ftiny-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmcdos%2Ftiny-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmcdos%2Ftiny-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmcdos%2Ftiny-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmcdos","download_url":"https://codeload.github.com/tmcdos/tiny-json/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243606960,"owners_count":20318314,"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":["delphi7","json-library"],"created_at":"2024-11-20T13:33:05.291Z","updated_at":"2026-01-02T05:32:34.731Z","avatar_url":"https://github.com/tmcdos.png","language":"Pascal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSON library for Delphi\n\nThis is a small and clean library for associative arrays with Boolean / Integer / Float / WideString values. \nAllows import (export) from (to) JSON text. Extensive error-checking. \n\nSome open-source projects I would like to give credit:\n\n* [FunHash](https://github.com/funny-falcon/funny_hash) by Sokolov Yura\n* [HatTrie](https://github.com/dcjones/hat-trie) by Daniel C. Jones\n* FastInt64 - _unknown source_\n* [FastMove](http://fastcode.sourceforge.net/challenge_content/FastMove.html) by FastCode project\n\nThe library was built for the ease of use and clean understandable code - performance was not a first priority so I have not made any benchmarking.\n\nFeatures\n========\n* Numeric and WideString indexes (similar to PHP arrays)\n* Boolean / Int64 / Double / WideString item values\n* Strict parsing of JSON with descriptive Exception on error\n* Simple interface (Add, Delete, Remove, Clear)\n* Simple iterators (First, Last, Prev, Next)\n\nTypes of node values\n=====\n\n|Name|Description|\n|---|---|\n|jsNull|The `NULL` value|\n|jsBool|Node value is `Boolean`|\n|jsInt|Node value is `Integer`|\n|jsFloat|Node value is `Floating-point`|\n|jsString|Node value is `String`|\n|jsArray|Node is an array - has children|\n\nIterators\n======\n\n- TJSONEnum = procedure (Nomer: Integer; Elem: TJSONbase; Data: Pointer; Var Stop: Boolean);\n- TJSONEnumObj = procedure (Nomer: Integer; Elem: TJSONbase; Data: Pointer; Var Stop: Boolean) Of Object;\n\nParsing\n=====\n### function ParseJSON(JSON_str: PAnsiChar): TJSONbase;\n\nProperties\n==========\n\n|Name|Type|Description|\n|---|---|---|\n|Assoc|Boolean|Whether all keys are Numeric or at least *one* key is String|\n|Parent|TJSONbase|Where the given node belongs to|\n|FirstChild|TJSONbase|Childs are organized as a double-linked list|\n|LastChild|TJSONbase|Childs are organized as a double-linked list|\n|Next|TJSONbase|Next sibling (by the order of creation)|\n|Prev|TJSONbase|Previous sibling (by the order of creation)|\n|SelfType|TJSONtype|Type of data in the current node|\n|Value|Variant|Value of the current node|\n|Count|Integer|Number of children if the node is non-scalar|\n|Name|WideString|The String *key* of the current node if this is an associative array|\n|ID|Integer|The Numeric *key* of the current node if this is non-associative array|\n|Child[Index: Integer]|TJSONbase|Used to access the children of non-associative arrays|\n|Field[Key: WideString]|TJSONbase|Used to access the children of associatve arrays|\n|JsonText|AnsiString|Stringification of the current node as JSON text|\n\nMethods\n=======\n\n|Name|Parameters|Returns|Description|\n|---|---|---|---|\n|Clear| | |Remove all children|\n|Delete|Idx: Integer| |Delete a child from non-associative array and free the object|\n|Delete|Key: WideString| |Delete a child from associative array and free the object|\n|Remove|Idx: Integer|TJSONbase|Removee a child from non-associative array and return the object|\n|Remove|Key: WideString|TJSONbase|Remove a child from associative array and return the object|\n|ForEach|Iterator: TJSONEnum\u003cbr\u003eUserData: Pointer| |Iterates over the children of non-associative array|\n|ForEach|Iterator: TJSONEnumObj\u003cbr\u003eUserData: Pointer| |Iterates over the children of associative array|\n|Add|B: Boolean|TJSONbase|Appends a new `Boolean` child to the node (making it an array if not already, returns the new child)|\n|Add|I: Int64|TJSONbase|Appends a new `Integer` child to the node (making it an array if not already, returns the new child)|\n|Add|D: Double|TJSONbase|Appends a new `Floating-point` child to the node (making it an array if not already, returns the new child)|\n|Add|S: WideString|TJSONbase|Appends a new `String` child to the node (making it an array if not already, returns the new child)|\n|Add|A: TJSONbase| |Appends an existing array as a child to the node (making it an array if not already|\n|Add|Key: WideString\u003cbr\u003eB: Boolean|TJSONbase|Appends a new `Boolean` child to the node (making it an array if not already, returns the new child)|\n|Add|Key: WideString\u003cbr\u003eI: Int64|TJSONbase|Appends a new `Integer` child to the node (making it an array if not already, returns the new child)|\n|Add|Key: WideString\u003cbr\u003eD: Double|TJSONbase|Appends a new `Floating-point` child to the node (making it an array if not already, returns the new child)|\n|Add|Key: WideString\u003cbr\u003eS: WideString|TJSONbase|Appends a new `String` child to the node (making it an array if not already, returns the new child)|\n|Add|Key: WideString\u003cbr\u003eA: TJSONbase| |Appends an existing array as a child to the node (making it an array if not already|\n\nPossible errors\n===============\n- Unsupported assignment of object\n- Automatic indexing overflow\n- Invalid data type assigned to TJSONbase\n- This is an array - it does not have a value by itself\n- Index is outside the array\n- TJSONbase is not an array and does not support indexes\n- Associative arrays do not support empty index\n- TJSONbase is not an array and does not have Count property\n- Unsupported data type in TJSONbase.JsonText\n- Unexpected character at position\n- Empty element at position\n- Missing closing bracket for array\n- Missing closing bracket for object\n- Unterminated string at position\n- Missing property name/value delimiter (:) at position\n- Missing property value at position\n- Missing fractional part of a floating-point number at position\n- Exponent of the number is not integer at position\n- Unquoted property name at position\n- Control character encountered at position\n- Unrecognized escape sequence at position\n- Invalid UNICODE escape sequence at position\n- Unescaped symbol at position\n- Empty property name at position\n- Expected closing bracket or comma at position\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmcdos%2Ftiny-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmcdos%2Ftiny-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmcdos%2Ftiny-json/lists"}