🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

json-as

Package Overview
Dependencies
Maintainers
1
Versions
192
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-as - npm Package Versions

1
57
20

1.0.0-beta.3

Diff
jairussw
published 1.0.0-beta.3 •

Changelog

Source

2025-02-25 - 1.0.0-beta.3

  • feat: change JSON.Raw to actual class to facilitate proper support without transformations
  • fix: remove old JSON.Raw logic from transform code
jairussw
published 1.0.0-beta.2 •

Changelog

Source

2025-02-25 - 1.0.0-beta.2

  • feat: add support for custom serializers and deserializers #110
jairussw
published 1.0.0-beta.1 •

Changelog

Source

2025-02-22 - 1.0.0-beta.1

  • perf: add benchmarks for both AssemblyScript and JavaScript
  • docs: publish preliminary benchmark results
  • tests: ensure nested serialization works and add to tests
  • feat: finish arbitrary type implementation
  • feat: introduce JSON.Obj to handle objects effectively
  • feat: reimplement arbitrary array deserialization
  • fix: remove brace check on array deserialization
  • feat: introduce native support for JSON.Obj transformations
  • feat: implement arbitrary object serialization
  • fix: deserialization of booleans panics on false
  • fix: bs.resize should be type-safe
  • impl: add JSON.Obj type as prototype to handle arbitrary object structures
  • chore: rename static objects (schemas) to structs and name arbitrary objects as obj
  • tests: add proper tests for arbitrary types
  • fix: empty method generation using outdated function signature
  • docs: update readme to be more concise
jairussw
published 1.0.0-alpha.4 •

Changelog

Source

2025-02-13 - 1.0.0-alpha.4

  • feat: reintroduce support for Box<T>-wrapped primitive types
  • tests: add extensive tests to all supported types
  • fix: 6-byte keys being recognized on deserialize
  • perf: take advantage of aligned memory to use a single 64-bit load on 6-byte keys
  • fix: bs.proposeSize() should increment stackSize by size instead of setting it
  • fix: allow runtime to manage bs.buffer
  • fix: memory leaks in bs module
  • fix: add (possibly temporary) JSON.Memory.shrink() to shrink memory in bs
  • perf: prefer growing memory by nextPowerOf2(size + 64) for less reallocations
  • tests: add boolean tests to Box<T>
  • fix: serialization of non-growable data types should grow bs.stackSize
jairussw
published 1.0.0-alpha.3 •

Changelog

Source

2025-01-31 - 1.0.0-alpha.3

  • fix: write to proper offset when deserializing string with \u0000-type escapes
  • fix: simplify and fix memory offset issues with bs module
  • fix: properly predict minimum size of to-be-serialized schemas
  • fix: replace as-test with temporary framework to mitigate json-as versioning issues
  • fix: fix multiple memory leaks during serialization
  • feat: align memory allocations for better performance
  • feat: achieve a space complexity of O(n) for serialization operations, unless dealing with \u0000-type escapes
jairussw
published 0.9.29 •
jairussw
published 1.0.0-alpha.2 •

Changelog

Source

2025-01-20 - 1.0.0-alpha.2

  • fix: disable SIMD in generated transform code by default
  • fix: re-add as-bs dependency so that it will not break in non-local environments
  • fix: remove AS201 'conversion from type usize to i32' warning
  • fix: add as-bs to peer dependencies so only one version is installed
  • fix: point as-bs imports to submodule
  • fix: remove submodule in favor of static module
  • fix: bs.ensureSize would not grow and thus cause memory faults
  • fix: bs.ensureSize triggering unintentionally
jairussw
published 1.0.0-alpha.1 •

Changelog

Source

2025-01-20 - 1.0.0-alpha.1

  • feat: finish implementation of arbitrary data serialization and deserialization using JSON.Value
  • feat: reinstate usage of JSON.Box<T>() to support nullable primitive types
  • feat: eliminate the need to import the JSON namespace when defining a schema
  • feat: reduce memory usage so that it is viable for low-memory environments
  • feat: write to a central buffer and reduce memory overhead
  • feat: rewrite the transform to properly resolve schemas and link them together
  • feat: pre-allocate and compute the minimum size of a schema to avoid memory out of range errors
jairussw
published 0.9.28 •
jairussw
published 0.9.27 •