Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.

Remove NaN values from JSON responses #516

Open
ajmacdonald opened this issue Nov 5, 2020 · 2 comments
Open

Remove NaN values from JSON responses #516

ajmacdonald opened this issue Nov 5, 2020 · 2 comments
Assignees
Labels

Comments

@ajmacdonald
Copy link
Collaborator

Some tool results can contain NaN as a value, which is not valid JSON. Using fetch to call these tools causes an error when response.json() fails.

Some tools where this can occur: CorpusTerms, CorpusTermCorrelations.

CorpusTerm sets the comparisonRelativeFreqDifference to 0 if it is NaN. Should we do this for the other occurrences as well?

@ajmacdonald ajmacdonald self-assigned this Nov 5, 2020
@ajmacdonald
Copy link
Collaborator Author

Maybe it makes more sense to return null instead.

@ajmacdonald
Copy link
Collaborator Author

Also need to remove Infinity. This can occur in the CA/PCA/TSNE analysis tools.

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

No branches or pull requests

1 participant