/Recast

A web-based tool to recast, type, and visualize JSON

Primary LanguageTypeScriptMIT LicenseMIT

recast

Typed JavaScript application to recast, type, and visualize JSON that is built on React incorporating Recoil for state management, MUI v5 for UI/UX, Monaco-editor as an IDE and other libraries. Methods, models, and inspiration were derived in part from refactoring jsonrepair , jsoneditor , json-source-map , javascript-natural-sort code bases, some of which are no longer maintained.

Libraries used in development

Library Description
react create-react-app Typescript
validatorjs
repo
Repair invalid JSON documents. The following issues can be fixed:
validators currently available
sanitizers currently available
jsonrepair
testing
repo
A library of string validators and sanitizers.
Repair invalid JSON documents. The following issues can be fixed:

- Add missing quotes around keys
- Add missing escape characters
- Add missing commas
- Replace single quotes with double quotes
- Replace special quote characters like “...” with regular double quotes
- Replace special white space characters with regular spaces
- Replace Python constants None, True, and False with null, true, and false
- Strip trailing commas
- Strip comments like /* ... */ and // ...
- Strip JSONP notation like callback({ ... })
- Strip escape characters from an escaped string like {\"stringified\": \"content\"}
- Strip MongoDB data types like NumberLong(2) and ISODate("2012-12-19T06:01:17.171Z")
- Concatenate strings like "long text" + "more text on next line"
- Turn newline delimited JSON into a valid JSON array

Github Repo

Release branch. Merge stable codes from only develop branch. After merging via a pull request from develop, automatically deploy to GitHub.

License

Copyright (c) 2021 - 2026 Alfred Melson & Licensed under the MIT License.

Issues and features to be implemented

updated 05 Jan 2022

  • user preferred color mode (ThemeModeToggle).
  • keyboard navigation (folder: action).
  • testing with Jest