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

JSON to NDJSON Converter

Turn an array into one JSON value per line for a log or a stream, and turn those lines back into an array.

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.

    JSON

    Carregar de uma URL

    Busca a URL diretamente do seu navegador.

    NDJSON

    O resultado aparece aqui.

    Batch validation

    A report on the JSONL in the left pane, whichever direction is selected. Nothing here changes the document.

    Funciona inteiramente no seu navegador.

    Sobre esta ferramenta

    NDJSON is one JSON value per line, and that is the whole format. It exists because a reader can handle a line and forget it, which is what makes a log file or a large export streamable when a single enormous array is not. Any JSON value is allowed on a line, not only an object, and no line is indented, because a line break inside a value would end the record. This tool skips a completely blank line rather than failing on it, since almost every file ends with a newline, and it reports a line that does not parse by the number it has in your file rather than by a position in some rewritten document. That skip is the default; the Blank lines option can treat a blank line as a failure instead. Keep valid lines changes what a bad line does to the rest of the file: instead of stopping the conversion, every line is judged on its own, the lines that parse build the result, and the lines that do not are listed with their line number and reason. Both directions go through the token stream, so a twenty digit integer comes back with all twenty digits. Batch validation, below the converter, is a separate report rather than a conversion: it checks every record on its own against an optional JSON Schema, checks for required fields, finds duplicate values in one chosen ID field, and compares every record's keys and types against whichever shape most records actually have, without changing the document.

    Como usar

    1. Choose a direction, then paste your document into the left pane or load the sample.
    2. Press Convert. Going to NDJSON needs an array, since that is the JSON shape that is a sequence of values.
    3. Copy the result or download it. Any line that does not parse is reported with its line number.