Giter VIP home page Giter VIP logo

Comments (8)

jozsefsallai avatar jozsefsallai commented on May 31, 2024

Hello! Do you see any error in the browser's console?

from insomnia-documenter.

pepik1999 avatar pepik1999 commented on May 31, 2024

I found this, but makes no sense:

SyntaxError: JSON.parse: expected ',' or '}' after property value in object at line 6 column 23 of the JSON data

I parse the insomnia.json file using python -m json.tool and it did not report any errors, and this happens when I pull a fresh export from insomnia.

Any suggestions?

from insomnia-documenter.

pepik1999 avatar pepik1999 commented on May 31, 2024

my insomnia file is 137kb in size, not sure if that matters or not

from insomnia-documenter.

jozsefsallai avatar jozsefsallai commented on May 31, 2024

Does your file contain comments by any chance?

from insomnia-documenter.

pepik1999 avatar pepik1999 commented on May 31, 2024

So thinking about your suggestion to look for Comments, I didn't find any, I did export multiple times until I narrowed it down to a single folder and in the ones that I excluded from export was one that was causing my issues.

I found the issue, it was on a duplicate api post call I had created, it had double quotes in the JSON body.  IE:

{  
  "test1": "me",  
  "test2": "you", 
  "error": "here is my problem"", 
  "end": "end"
}

Thank you for the guidance this issue can be closed out.

from insomnia-documenter.

jozsefsallai avatar jozsefsallai commented on May 31, 2024

That's kinda weird tbh because Insomnia should escape quotes when exporting... or not even Insomnia but the JSON serializer itself. It's also weird that json.tool thinks it's ok.

from insomnia-documenter.

pepik1999 avatar pepik1999 commented on May 31, 2024

the export showed

{  
  \"test1\": \"me\",  
  \"test2\": \"you\", 
  \"error\": \"here is my problem\"\", 
  \"end\": \"end\"
}

As soon as I changed it by removing the second escaped quote, your software rendered the page properly.

{  
  \"test1\": \"me\",  
  \"test2\": \"you\", 
  \"error\": \"here is my problem\", 
  \"end\": \"end\"
}
```

It is proper json output, but I guess it was just enough for the bundle.js to not be able to render properly.

I hope this issue can help others that might see or have a similar issue.  

from insomnia-documenter.

jozsefsallai avatar jozsefsallai commented on May 31, 2024

Ah that's fair enough then because Insomnia Documenter is trying to format those individually (indentation, syntax highlighting, etc.). So when it tried to parse that block, it failed because it's not valid JSON. I should probably make the error message be a little less vague.

from insomnia-documenter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.