{"id":30105699,"url":"https://github.com/ozontech/insane-json","last_synced_at":"2025-08-10T00:18:56.801Z","repository":{"id":46733644,"uuid":"206842969","full_name":"ozontech/insane-json","owner":"ozontech","description":"Lighting fast and simple JSON decode/encode library for GO","archived":false,"fork":false,"pushed_at":"2024-12-16T10:07:30.000Z","size":369,"stargazers_count":62,"open_issues_count":4,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-05T10:51:58.695Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ozontech.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":"2019-09-06T17:26:45.000Z","updated_at":"2025-06-25T06:59:18.000Z","dependencies_parsed_at":"2023-01-22T07:00:27.793Z","dependency_job_id":"ca234a80-91c1-4341-830c-93095c4a16e9","html_url":"https://github.com/ozontech/insane-json","commit_stats":null,"previous_names":["vitkovskii/insane-json"],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/ozontech/insane-json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozontech%2Finsane-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozontech%2Finsane-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozontech%2Finsane-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozontech%2Finsane-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ozontech","download_url":"https://codeload.github.com/ozontech/insane-json/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozontech%2Finsane-json/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268883443,"owners_count":24323142,"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","status":"online","status_checked_at":"2025-08-05T02:00:12.334Z","response_time":2576,"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":[],"created_at":"2025-08-10T00:18:53.768Z","updated_at":"2025-08-10T00:18:56.791Z","avatar_url":"https://github.com/ozontech.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Insane JSON\nLighting fast and simple JSON decode/encode library for GO\n\n## Key features\nTo be filled\n\n## Usage\n```go\n    // ==== DECODE API ====\n    root, err = insaneJSON.DecodeString(jsonString)        // from string\n    root, err = insaneJSON.DecodeBytes(jsonBytes)          // from byte slice\n    defer insaneJSON.Release(root)                         // place root back to pool \n\n    // ==== GET API ====\n    code = root.Dig(\"response\", \"code\").AsInt()            // int from objects\n    body = root.Dig(\"response\", \"body\").AsString()         // string from objects\n\n    keys = []string{\"items\", \"3\", \"name\"} \n    thirdItemName = root.Dig(keys...).AsString()           // string from objects and array\n\n    // ==== CHECK API ====\n    isObject = root.Dig(\"response\").IsObject()             // is value object?\n    isInt = root.Dig(\"response\", \"code\").IsInt()           // is value null?\n    isArray = root.Dig(\"items\").IsArray()                  // is value array?\n\n    // ==== DELETE API ====\n    root.Dig(\"response\", \"code\").Suicide()                 // delete object field\n    root.Dig(\"items\", \"3\").Suicide()                       // delete array element\n    anyDugNode.Suicide()                                   // delete any previously dug node\n\n    // ==== MODIFY API ====\n    root.Dig(\"response\", \"code\").MutateToString(\"OK\")      // convert to string\n    root.Dig(\"items\", \"3\").MutateToObject()                // convert to empty object\n\n    item = `{\"name\":\"book\",\"weight\":1000}`\n    err = root.Dig(\"items\", \"3\").MutateToJSON(item)        // convert to parsed JSON  \n\n    // ==== OBJECT API ====\n    response = root.Dig(\"response\")                        // get object\n    fields = response.AsFields()                           // get object fields\n\n    for _, field = range(fields) {                         \n        fmt.Println(field.AsField())                       // print all object fields \n    }\n\n    for _, field = range(fields) {                         \n        response.Dig(field.AsField()).Suicide()            // remove all fields            \n    }\n\n    for _, field = range(fields) {                         \n        field.Suicide()                                    // simpler way to remove all fields\n    }\n    \n    header=\"Content-Encoding: gzip\"\n    response.AddField(\"header\").MutateToString(header)     // add new field and set value \n\n    // ==== ARRAY API ====\n    items = root.Dig(\"items\")                              // get array\n    elements = items.AsArray()                             // get array elements\n\n    for _, element = range(elements) {                     \n        fmt.Println(element.AsString())                    // print all array elements    \n    }\n\n    for _, element = range(elements) {                     \n        element.Suicide()                                  // remove all elements\n    }\n\n    item = `{\"name\":\"book\",\"weight\":1000}`\n    err = items.AddElement().MutateToJSON(item)            // add new element and set value \n\n    // ==== ENCODE API ====\n    To be filled\n\n    // ==== STRICT API ====\n    items = root.Dig(\"items\").InStrictMode()               // convert value to strict mode\n    items, err = root.DigStrict(\"items\")                   // or get strict value directly\n         \n    o, err = items.AsObject()                              // now value has api with error handling  \n    name, err = items.Dig(\"5\").Dig(\"name\").AsInt           // err won't be nil since name is a string \n\n    // ==== POOL API ====\n    root, err = insaneJSON.DecodeString(json)              // get a root from the pool and place decoded json into it \n    emptyRoot = insaneJSON.Spawn()                         // get an empty root from the pool            \n\n    root.DecodeString(emptyRoot, anotherJson)              // reuse a root to decode another JSONs\n\n    insaneJSON.Release(root)                               // place roots back to the pool\n    insaneJSON.Release(emptyRoot)                           \n```\n\n## Benchmarks\nTo be filled","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozontech%2Finsane-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fozontech%2Finsane-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozontech%2Finsane-json/lists"}