Superjson is a data notation created in 2014 by Matthew Mueller.
git clone https://github.com/blitz-js/superjson
#931on PLDB | 9Years Old |
A superset of JSON adding: undefined bigint Date RegExp Set Map Error
const object = {
normal: 'string',
timestamp: new Date(),
test: /superjson/,
};
const { json, meta } = serialize(object);
Feature | Supported | Token | Example |
---|---|---|---|
Lists | ✓ | [1, 2, 3] |
|
Maps | ✓ | {"name": "Mary"} |
|
Strings | ✓ | "hello world" |
|
Integers | ✓ | 80766866 |
|
Floats | ✓ | 2.3 |
|
Booleans | ✓ | false |
|
Case Insensitive Identifiers | X | ||
Semantic Indentation | X | ||
Multiline Strings | X | ||
File Imports | X | ||
MultiLine Comments | X | ||
Ternary operators | X | ||
Conditionals | X | ||
Line Comments | X | ||
Macros | X | ||
Comments | X | ||
Disk Output | X |