Skip to content

Not parsing new line correctly? #5

Description

@maroofi

Hi,
Here is the lua file:

local json = require("qjson")
a = "v=spf1 include:_netblocks.viacom.com include:_spf.salesforce.com include:spf.protection.outlook.com include:servers.mcsv.net include:stspg-customer.com\ninclude:_spf.google.com include:_spf-customer.tbxnet.com ~all"
print(json.encode({a}))

Running it on bash shows 2 lines while it should be one line.
lua s.lua | nl

output:
1 ["v=spf1 include:_netblocks.viacom.com include:_spf.salesforce.com include:spf.protection.outlook.com include:servers.mcsv.net include:stspg-customer.com
2 include:_spf.google.com include:_spf-customer.tbxnet.com ~all"]

The problem is that it breaks the line into two lines which I think it's not the normal behavior of the JSON.

what do you think?

Thanks,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions