question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Validation of .json fixtures causes bad formatting to be applied

See original GitHub issue
  • Operating System: Windows 10
  • Cypress Version: 1.0.2
  • Browser Version: n/a

Is this a Feature or Bug?

Bug.

Current behavior:

Fixture validation causes bad formatting for .json files, resulting in too many line breaks and no indentation.

e.g.

{
  
"modificationDate": "2017-10-27T14:40:27Z",
  
"isActive": false,
  
"contents": {
    
"en": {

For large fixtures it makes it difficult to read and edit.

Desired behavior:

Formatting for .json files should be indented, e.g.

{
  "modificationDate": "2017-10-27T14:40:27Z",
  "isActive": false,
  "contents": {
    "en": {

How to reproduce:

Running tests, reference a .json fixture. It will automatically format it.

Test code:

n/a

Additional Info (images, stack traces, etc)

n/a

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
brian-manncommented, Nov 20, 2017

Fixed in 1.1.0.

1reaction
brian-manncommented, Nov 16, 2017

EDIT:

Ok fine.

We’re going to turn this off by default but enable an option to turn this back on.

I am going to fix the issues with Windows formatting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

In Django loaddata it throws errors for json format but work ...
I've checked your code in linux mint/django 1.9/python 2.7 and it works fine. I think the problem may be the codification you have...
Read more >
The JSON Validator: A Custom Processor That Ensures Data ...
This blog post explores the features of a custom StreamSets Data Collector Engine (SDC) processor built to validate JSON data with the help ......
Read more >
JSON Validation with JSON Schema - David Walsh Blog
Bad assumption. Let me show you how Kris Zyp's JSON Schema can help you validate JSON on both the client and server sides....
Read more >
The Many Amazing Uses of JSON Schema: Client-side ...
JSON Schema is very simple; point out which fields might exist, which are required or optional, what data format they use. Other validation...
Read more >
Easy guide to JSON input validation in Rust web services
Rust, with the fantastic serde crate, helps here because deserialization to a struct will fail if a wrong data type is used.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found