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

JSON to JavaScript Converter

Convert between JSON and a JavaScript object literal without either document leaving your browser.

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.

    JavaScript

    O resultado aparece aqui.

    Funciona inteiramente no seu navegador.

    Sobre esta ferramenta

    JavaScript and JSON are close enough that any JSON document is already a valid JavaScript expression, but JavaScript adds conveniences JSON forbids. Writing, a key that is a valid identifier is written bare, an empty object or array stays on one line, and numbers travel through the token stream, so a twenty digit integer comes back with all twenty digits. Reading, an object literal with unquoted keys, single quoted strings, comments, trailing commas, template literals without interpolation and a leading const, let or var name are all accepted, and a number spelling JSON rejects, such as .5, 5. or 5.e3, is normalized to its exact JSON form. Everything JSON cannot hold is refused by name rather than guessed at: undefined, NaN and Infinity, hex, octal or binary numbers, numeric separators, a leading zero, a regular expression, a function and template interpolation. A key that appears twice is refused, and a __proto__ key whose value is an object or null is refused too, because in a JavaScript object literal that spelling sets the prototype instead of creating a property. An undefined can become null when you opt in, since JSON has no undefined and silently replacing a value can change what the data meant.

    Como usar

    1. Choose a direction, then paste your document into the left pane or load the sample.
    2. Pick the indent width, then press Convert.
    3. Copy the result or download it as a file.