Skip to contents

Parses and re-serializes an eon string, normalizing whitespace and style without changing the data.

Usage

reformat_eon(x, indent = "\t")

reformat_eon(x, indent = "\t")

Arguments

x

A character string containing eon-formatted text.

indent

A string used for each level of indentation. Defaults to a tab.

Value

A reformatted eon string.

Examples

reformat_eon('{name:"Alice",age:30}')
#> [1] "name: \"Alice\"\nage: 30\n"
reformat_eon('{name:"Alice",age:30}', indent = '  ')
#> [1] "name: \"Alice\"\nage: 30\n"