Skip to content

New line in string value causing issues #3

@keithslater

Description

@keithslater

I am converting json to lua with the format method. My json has a string with a bunch of \n characters. When it runs through the converter, it changes the \n to actual new lines.

Ex.

"test": "one, two\n24982578,0\n25227524,10000000\n25334028,0\n25446352,10000000\n25447713,0\n25466455,10000000\n25467893,0\n25467972,10000000\n25469297,0\n25473686,10000000\n25474680,0\n25477985,10000000\n25480967,0\n25486622,10000000\n25488029,0\n25496669,10000000\n25497759,0\n25497842,10000000\n25547114,0\n25551549,10000000\n25554293,0\n25555323,10000000\n25556874,0\n25557190,10000000\n25568831,0\n25603246,10000000\n25632188,0\n25728228,10000000\n25888375,0",

Currently is converting to

test = "one,two
24982578,0
25227524,10000000
25334028,0
25446352,10000000
25447713,0
25466455,10000000
25467893,0
25467972,10000000
25469297,0
25473686,10000000
25474680,0
25477985,10000000
25480967,0
25486622,10000000
25488029,0
25496669,10000000
25497759,0
25497842,10000000
25547114,0
25551549,10000000
25554293,0
25555323,10000000
25556874,0
25557190,10000000
25568831,0
25603246,10000000
25632188,0
25728228,10000000
25888375,0",

Which isn't valid

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions