Skip to content

Conversation

@acupoftee
Copy link

@acupoftee acupoftee commented Sep 28, 2019

This PR addresses Issue #22 from the original repo.

  • My approach for this iteration was to add an alert for large JSON files. This would be good feedback for the user when trying to parse JSON.
// First, check if it's plain text and exit if not
  const plainText = getTextFromTextOnlyDocument();
  if (!plainText || plainText.length > 3000000) {
    // If there is plain text and it's over 3MB, send alert
    plainText && alert('JSON Formatter Error: Cannot parse JSON larger than 3MB');
    port.disconnect();
    return;
  }
  • Since issue #67 from the same included a possible solution for parsing large JSON files, this may be included in the next iteration

- Display empty objects and arrays  without formatting
@acupoftee acupoftee mentioned this pull request Sep 29, 2019
@nicole-ashley nicole-ashley merged commit 037fec3 into nicole-ashley:master Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants