streamich / json-joy Goto Github PK
View Code? Open in Web Editor NEWJSON CRDT, JSON CRDT Patch, JSON Patch+, JSON Predicate, JSON Pointer, JSON Expression, JSON Type
Home Page: https://jsonjoy.com/libs/json-joy-js
License: Apache License 2.0
JSON CRDT, JSON CRDT Patch, JSON Patch+, JSON Predicate, JSON Pointer, JSON Expression, JSON Type
Home Page: https://jsonjoy.com/libs/json-joy-js
License: Apache License 2.0
true
or false
.json-expression
.
ExprGet
ExprEquals
ExprNotEquals
ExprIf
ExprAnd
ExprOr
ExprNot
ExprType
ExprBool
ExprNum
ExprInt
ExprStr
ExprStarts
ExprContains
ExprEnds
ExprDefined
ExprIn
ExprMatches
ExprCat
ExprSubstr
ExprLessThan
ExprLessThanOrEqual
ExprGreaterThan
ExprGreaterThanOrEqual
ExprBetweenNeNe
ExprBetweenNeEq
ExprBetweenEqNe
ExprBetweenEqEq
ExprMin
ExprMax
ExprPlus
ExprMinus
ExprAsterisk
ExprSlash
ExprMod
ExprRound
ExprCeil
ExprFloor
json-expression
"get" operator if value not found.json-expression
should throw on any undefined
values? As undefined
is not part of JSON and is unique to JavaScript.json-expression
It could be called json-expressions
and implement basic expressions, like:
['and',
['starts', 'mu.bl/:posts-', ['get', '/req/id']],
['<', ['len', ['get', '/req/batch']], 5]
]
['add', '/tmp/userId', ['val', 'xxxxxxxx']]
['and',
['==',
'document-123',
['get', '/channel']],
['==',
'mousemove',
['get', '/data/type']],
['<',
123234343433,
['get', '/data/timestamp']],
['in', ['get', '/data/customer_interests'], [[
"rugby",
"football",
"baseball"
]]]
]
Alternatively, a more advanced version of this could treat everything as function:
['map', [[1, 2, 3]], ['*', 2]] // [2, 4, 6]
JsonPackValue
blobs.When client unsubscribes from streaming Reactive-RCP response, the server should not send ResponseCompleteMessage as it is implicit.
Expose Reactive-RPC server using HTTP for uWebsocket.js server
Implement JSON-Rx and Binary-Rx clients.
Authorization
HTTP header.access_token
URL search param.Authorization
header.Add binary data Uint8Array
support to JSON.stringify
and JSON.parse
. Implement JSONB.stringify
and JSONB.parse
.
Uint8Array
, Buffer
, etc..) to data URI. Binary data in JSON can be encoded as string, which starts with data:application/octet-stream;base64,
.data:application/msgpack;base64;ext=<num>,
or data:application/octet-stream;base64;ext=<num>,
.JsonPackValue
class.Uint8Array
.MsgPackExtension
.JsonPackValue
class.Write a fast MessagePack to JSON converter, which does not do an intermediate step to load JSON into an in-memory representation, but directly writes to JSON.
Explore and implement JSON CRDT using Microsoft DDS (Distributed Data Type) approach.
Make encoder and MsgPack encoder to be able to write directly into Base64 string.
This should be an optimization, instead of writing to a Buffer and then converting to Base64.
json-type
to custom TypeScript AST.Implement server part of JSON-Rx which uses JSON array objects instead of serialized strings.
Execute pre-call checks such as authentication and authorization, and throttling.
Close streaming calls after some timeout due to inactivity
Add programmatic API for RpcServer
for static and streaming methods to execute server methods programatically.
.isInteger
or type: 'u8' | 'u16' | 'u32' ...
annotations to "num" json-type.JSON.stringify
type: 'ascii' | 'utf8' ...
Allow in compact JSON Patch encoding to use string op names.
Instead of:
export type CompactAddOp = [opcode: OPCODE.add, path: string | Path, value: unknown];
allow:
export type CompactAddOp = [opcode: OPCODE.add | 'add', path: string | Path, value: unknown];
Implement JSON URL or similar format where objects and arrays are discriminated.
Challenges:
Expose Reactive-RPC server using HTTP streaming requests for uWebsocket.js server
Extend operations to contain information needed to undo that operation.
applyPatch
function to automatically augment operations with data necessary for time travel.add
operation — add old
key.remove
operation — add old
key.replace
operation — add old
key.move
operation — add old
key.copy
operation — add old
key.flip
— investigate if changes needed.inc
— investigate if changes needed.str_ins
— investigate if changes needed.str_del
— add old
key .split
— investigate if changes needed.merge
— investigate if changes needed.extend
— save old props.Implement various fast JSON equality functions.
enum
typeor
typeref
typecustomValidators
property as in JSON Schema "format", which allows to provide extra validator..Object()
interface to receive fields as list.t.
builder to allow easy type ID specification.json-type-serializer
.obj
type to extend another obj
type?or
type, which holds obj
or enum
types holding "const" types.
or
type can be more than one level deep.Implement operational transformations
str
prop from string operations, leave length.json0
type operation.json1
type operation.
text-unicode
subtype.text
subtype.text
type operation.text-unicode
type operation.Currently only json
nominal encoding for JSON Patch+ operations is validated. Create a way to validate the operation patch regardless of the way it is serialized.
Incoming format of operation patch:
json
compact
binary
Candidates:
Allow storing custom payload on operations.
Expose Reactive-RPC server using HTTP streaming requests for uWebsocket.js server
Write a quick validator, which checks that blob contents is a valid MessagePack object.
{}5
. It should allow the user to fail such cases.json-joy
.
Implement operations that treat arrays as sets. See json-patch/json-patch2#8 (comment)
json-random
for fuzz testing.match
operation, but with safe RegExp implementation.A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.