Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to parse object (amazon support) #14

Closed
GreenPioneer opened this issue Dec 3, 2018 · 3 comments
Closed

unable to parse object (amazon support) #14

GreenPioneer opened this issue Dec 3, 2018 · 3 comments
Assignees
Milestone

Comments

@GreenPioneer
Copy link
Contributor

GreenPioneer commented Dec 3, 2018

Worked with amazon recently and they send back strings like the tests below

it('{test:"{"name":"gps"}"}', function () {
      assert.deepEqual(autoParse({test:'{\\"name\\": \"greenpioneer\",\n \"company\": true,\n \\"customers\\": 1000}'}), { // eslint-disable-line
        test: {
          name: 'greenpioneer',
          company: true,
          customers: 1000
        }
      })
    })
    it('\\n', function () {
      assert.deepEqual(autoParse('{\\"name\\": \"greenpioneer\",\n \"company\": true,\n \\"customers\\": 1000}'), { // eslint-disable-line
        name: 'greenpioneer',
        company: true,
        customers: 1000
      })
    })
    it('\\"', function () {
      assert.deepEqual(autoParse('{\\"name\\": \"greenpioneer\",\"company\": true,\\"customers\\": 1000}'), { // eslint-disable-line
        name: 'greenpioneer',
        company: true,
        customers: 1000
      })
    })
    it('"{}"', function () {
      assert.deepEqual(autoParse('"{"name": "greenpioneer","company": true,"customers": 1000}"'), { // eslint-disable-line
        name: 'greenpioneer',
        company: true,
        customers: 1000
      })
    })
@GreenPioneer GreenPioneer added this to the 1.6 milestone Dec 3, 2018
@GreenPioneer GreenPioneer self-assigned this Dec 3, 2018
@GreenPioneer GreenPioneer changed the title unable to parse object unable to parse object (amazon support) Dec 3, 2018
@GreenPioneer
Copy link
Contributor Author

@IonicaBizau - I wanted to get your opinion on this update.

@IonicaBizau
Copy link
Contributor

@GreenPioneer What is the change here, more exactly?

@GreenPioneer
Copy link
Contributor Author

This one

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

No branches or pull requests

2 participants