{"id":28471966,"url":"https://github.com/designliquido/delegua-json","last_synced_at":"2026-04-02T18:08:36.335Z","repository":{"id":79581177,"uuid":"579145857","full_name":"DesignLiquido/delegua-json","owner":"DesignLiquido","description":"Biblioteca para Delégua e JavaScript para manipulação de JSON.","archived":false,"fork":false,"pushed_at":"2026-03-29T18:06:13.000Z","size":127,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"principal","last_synced_at":"2026-03-29T20:18:50.166Z","etag":null,"topics":["hacktoberfest","json","portugues","portuguese","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/DesignLiquido.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-12-16T19:25:02.000Z","updated_at":"2026-03-29T18:06:16.000Z","dependencies_parsed_at":"2025-07-19T03:37:05.705Z","dependency_job_id":null,"html_url":"https://github.com/DesignLiquido/delegua-json","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/DesignLiquido/delegua-json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DesignLiquido%2Fdelegua-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DesignLiquido%2Fdelegua-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DesignLiquido%2Fdelegua-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DesignLiquido%2Fdelegua-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DesignLiquido","download_url":"https://codeload.github.com/DesignLiquido/delegua-json/tar.gz/refs/heads/principal","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DesignLiquido%2Fdelegua-json/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31312744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["hacktoberfest","json","portugues","portuguese","typescript"],"created_at":"2025-06-07T11:09:33.603Z","updated_at":"2026-04-02T18:08:36.328Z","avatar_url":"https://github.com/DesignLiquido.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# delegua-json\n\nBiblioteca para manipulação de JSON. Não deve ser usada em aplicações Web, por exigir um sistema de arquivos. \n\nEm [Delégua Web](https://designliquido.github.io/delegua-web), apenas dois métodos estão disponíveis:\n\n- `textoParaJson`, que recebe um texto expressado em notação JSON e o converte para dicionário em Delégua;\n- `objetoParaTextoJson`, que recebe um dicionário ou objeto em Delégua e o converte para um texto em notação JSON.\n\nSe esta biblioteca executa em um ambiente Node.js, Bun, ou similares, há mais dois métodos disponíveis:\n\n- `importarArquivoJson`, importa um arquivo JSON pelo seu caminho, seja absoluto ou relativo, e o transforma em um dicionário de Delégua se for um arquivo JSON válido;\n- `exportarObjetoParaArquivoJson`, exporta um objeto ou dicionário de Delégua para um arquivo passado como parâmetro.\n\nPara importar em ambos os ambientes, basta usar:\n\n```js\nvar json = importar('json')\n```\n\n# Modo de uso\n\nUsando [a solução Delégua com todas as bibliotecas](https://github.com/DesignLiquido/delegua-completo), ou ainda usando [Delégua Web](https://designliquido.github.io/delegua-web?codigo=dmFyIGpzb24gPSBpbXBvcnRhcignanNvbicpCnZhciB0ZXh0b0pzb24gPSAneyJmdW5jaW9uYXJpb3MiOlt7ImlkIjowLCJub21lIjoiTWFyY2VsbyIsInNvYnJlbm9tZSI6IlNpbHZhIiwic2FsYXJpbyI6MzIwMCwiYXJlYSI6IlNNIn0seyJpZCI6MSwibm9tZSI6Ildhc2hpbmd0b24iLCJzb2JyZW5vbWUiOiJSYW1vcyIsInNhbGFyaW8iOjI3MDAsImFyZWEiOiJVRCJ9LHsiaWQiOjIsIm5vbWUiOiJTZXJnaW8iLCJzb2JyZW5vbWUiOiJQaW5oZWlybyIsInNhbGFyaW8iOjI0NTAsImFyZWEiOiJTRCJ9LHsiaWQiOjMsIm5vbWUiOiJCZXJuYXJkbyIsInNvYnJlbm9tZSI6IkNvc3RhIiwic2FsYXJpbyI6MzcwMCwiYXJlYSI6IlNNIn0seyJpZCI6NCwibm9tZSI6IkNsZXZlcnRvbiIsInNvYnJlbm9tZSI6IkZhcmlhcyIsInNhbGFyaW8iOjI3NTAsImFyZWEiOiJTRCJ9LHsiaWQiOjUsIm5vbWUiOiJBYnJhw6NvIiwic29icmVub21lIjoiQ2FtcG9zIiwic2FsYXJpbyI6MjU1MCwiYXJlYSI6IlNEIn0seyJpZCI6Niwibm9tZSI6IkxldMOtY2lhIiwic29icmVub21lIjoiRmFyaWFzIiwic2FsYXJpbyI6MjQ1MCwiYXJlYSI6IlVEIn0seyJpZCI6Nywibm9tZSI6IkZlcm5hbmRvIiwic29icmVub21lIjoiUmFtb3MiLCJzYWxhcmlvIjoyNDUwLCJhcmVhIjoiU0QifSx7ImlkIjo4LCJub21lIjoiTWFyY2VsbyIsInNvYnJlbm9tZSI6IkZhcmlhcyIsInNhbGFyaW8iOjI1NTAsImFyZWEiOiJVRCJ9LHsiaWQiOjksIm5vbWUiOiJGYWJpbyIsInNvYnJlbm9tZSI6IlNvdXphIiwic2FsYXJpbyI6Mjc1MCwiYXJlYSI6IlNEIn0seyJpZCI6MTAsIm5vbWUiOiJDbGVkZXJzb24iLCJzb2JyZW5vbWUiOiJPbGl2ZWlyYSIsInNhbGFyaW8iOjI1MDAsImFyZWEiOiJTRCJ9XSwiYXJlYXMiOlt7ImNvZGlnbyI6IlNEIiwibm9tZSI6IkRlc2Vudm9sdmltZW50byBkZSBTb2Z0d2FyZSJ9LHsiY29kaWdvIjoiU00iLCJub21lIjoiR2VyZW5jaWFtZW50byBkZSBTb2Z0d2FyZSJ9LHsiY29kaWdvIjoiVUQiLCJub21lIjoiRGVzaWduZXIgZGUgVUkvVVgifV19JzsKdmFyIGRpY2lvbmFyaW9Kc29uID0ganNvbi50ZXh0b1BhcmFKc29uKHRleHRvSnNvbikKZXNjcmV2YShkaWNpb25hcmlvSnNvbi5mdW5jaW9uYXJpb3MpIC8vIE91IGVzY3JldmEoZGljaW9uYXJpb0pzb25bImZ1bmNpb25hcmlvcyJdKQ==), importe a biblioteca e use-a da seguinte forma:\n\n```js\nvar json = importar('json')\nvar textoJson = '{\"funcionarios\":[{\"id\":0,\"nome\":\"Marcelo\",\"sobrenome\":\"Silva\",\"salario\":3200,\"area\":\"SM\"},{\"id\":1,\"nome\":\"Washington\",\"sobrenome\":\"Ramos\",\"salario\":2700,\"area\":\"UD\"},{\"id\":2,\"nome\":\"Sergio\",\"sobrenome\":\"Pinheiro\",\"salario\":2450,\"area\":\"SD\"},{\"id\":3,\"nome\":\"Bernardo\",\"sobrenome\":\"Costa\",\"salario\":3700,\"area\":\"SM\"},{\"id\":4,\"nome\":\"Cleverton\",\"sobrenome\":\"Farias\",\"salario\":2750,\"area\":\"SD\"},{\"id\":5,\"nome\":\"Abraão\",\"sobrenome\":\"Campos\",\"salario\":2550,\"area\":\"SD\"},{\"id\":6,\"nome\":\"Letícia\",\"sobrenome\":\"Farias\",\"salario\":2450,\"area\":\"UD\"},{\"id\":7,\"nome\":\"Fernando\",\"sobrenome\":\"Ramos\",\"salario\":2450,\"area\":\"SD\"},{\"id\":8,\"nome\":\"Marcelo\",\"sobrenome\":\"Farias\",\"salario\":2550,\"area\":\"UD\"},{\"id\":9,\"nome\":\"Fabio\",\"sobrenome\":\"Souza\",\"salario\":2750,\"area\":\"SD\"},{\"id\":10,\"nome\":\"Clederson\",\"sobrenome\":\"Oliveira\",\"salario\":2500,\"area\":\"SD\"}],\"areas\":[{\"codigo\":\"SD\",\"nome\":\"Desenvolvimento de Software\"},{\"codigo\":\"SM\",\"nome\":\"Gerenciamento de Software\"},{\"codigo\":\"UD\",\"nome\":\"Designer de UI/UX\"}]}';\nvar dicionarioJson = json.textoParaJson(textoJson)\nescreva(dicionarioJson.funcionarios) // Ou escreva(dicionarioJson[\"funcionarios\"])\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesignliquido%2Fdelegua-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdesignliquido%2Fdelegua-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesignliquido%2Fdelegua-json/lists"}