@powersync/service-jsonbig
TypeScript icon, indicating that this package has built-in type declarations

0.17.10 • Public • Published

powersync-jsonbig

JSON is used everywhere, including:

  1. PostgreSQL (json/jsonb types)
  2. Sync rules input (values are normalized to JSON text).
  3. Sync rule transformations (extracting values, constructing objects in the future)
  4. Persisting data in the database.
  5. Sending to the client.

Where we can, JSON data is kept as strings and not parsed. This is so that:

  1. We don't add parsing / serializing overhead.
  2. We don't change the data.

Specifically:

  1. The SQLite type system makes a distinction between INTEGER and REAL values. We try to preserve this.
  2. Integers in SQLite can be up to 64-bit.

For this, we use a custom parser, and use BigInt for all integers, and number for floats.

Dependents (5)

Package Sidebar

Install

npm i @powersync/service-jsonbig

Weekly Downloads

348

Version

0.17.10

License

FSL-1.1-Apache-2.0

Unpacked Size

22.8 kB

Total Files

15

Last publish

Collaborators

  • journeyapps-platform
  • journeyapps-admin