Pular para o conteudo principal
CuteJSON
↑↓ Navegar Enter Selecionar Esc Fechar

JSON Cleaner

Strip what a document does not need, rename or redact what it should not show, and keep only the paths that matter, in one pass.

Voltar para todas as ferramentas

Atalhos de teclado

Estes funcionam onde a acao correspondente existe nesta pagina.

Abrir a paleta de comandos
Ctrl/Cmd + K
Executar a acao principal
Ctrl/Cmd + Enter
Formatar
Ctrl/Cmd + Shift + F
Minimizar
Ctrl/Cmd + Shift + M
Copiar saida
Ctrl/Cmd + Shift + C
Abrir arquivo
Ctrl/Cmd + Shift + O
Baixar saida
Ctrl/Cmd + S
Fechar este dialogo
Esc
Abrir este dialogo
F1 / ?

Dados locais

Tudo abaixo e armazenado apenas neste navegador, neste dispositivo. Nada e enviado a lugar nenhum, e fechar este dialogo nao e necessario para que isso continue verdade.

Rascunhos nao salvos
Ferramentas com opcoes lembradas

Arquivos abertos recentemente

    Nenhum arquivo aberto ainda neste dispositivo.

    Compartilhar via link

    O conteudo e empacotado na parte do link apos o #, que navegadores nunca enviam a um servidor.

    Compartilha a primeira entrada nesta pagina.

    Nada para compartilhar ainda.

    Entrada

    Carregar de uma URL

    Busca a URL diretamente do seu navegador.

    Result

    The cleaned document appears here.

    Rules

    One rule per line in each box. A rule that matches nothing in this particular document is listed under the result rather than treated as a failure.

    Funciona inteiramente no seu navegador.

    Sobre esta ferramenta

    Twelve operations, run in one fixed order rather than whatever order they happen to be turned on in, because several of them would give a different answer depending on order. First, a genuine duplicate key already in the pasted document is resolved, keeping the last member written or the first, whichever the duplicate keys setting below says, since every step after this one assumes one member per name the way a JSON Pointer does. Keep paths, if any are set, prune the document down to just those paths and whatever it takes to reach them. Delete paths removes exactly what it names. Rename keys is a global, exact key name replace, at any depth. Redact keys replaces the value of any member whose key exactly matches, at any depth, with the fixed text [REDACTED]. Mask paths replaces the value at a pointer with the fixed text ***. Then the five plain toggles run together in one pass: removing null values, removing objects and arrays that are empty, including ones only emptied by the null removal that just ran in the same pass, trimming whitespace from string values, and dropping a later array element equal to an earlier one. Key case normalization runs last of all, deliberately, so every step above it can still match a key by the name it actually had in the document that was pasted in, before anything renamed or recased it. A path that does not resolve is not an error: it is noted underneath the result and skipped, since the same saved rule set is meant to stay reusable across documents that do not all share the exact same shape. A pointer that is not well formed, or a rename rule missing its arrow, is an error instead, since that is a mistake in what was typed rather than a mismatch with this particular document.

    Como usar

    1. Paste your JSON into the editor, or load the sample.
    2. Turn on whichever toggles apply, and add a rename, delete, keep, mask or redact rule, one per line, in any of the boxes below.
    3. Press Clean. Anything a rule could not find in this document is listed under the result rather than silently ignored.