JsonLogic

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • secure-json-logic

    Use logic-objects from uncertain sources and run them locally without breaking the own system

  • I also did this some year ago. A big learning was that you should define the allowed input types in the logic object.

    https://github.com/pubkey/secure-json-logic#readme

  • sci

    Configurable Clojure/Script interpreter suitable for scripting and Clojure DSLs

  • That's a strange lisp...

    A few other strategies for solving this problem include something along the lines of the Small Clojure Interpreter (1) and Defunctionalization (2, 3)

    [1] https://github.com/borkdude/sci

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • json-logic-rs

    JSONLogic implementation in Rust, accessible via Python and JS

  • We built a rust version of this that provides a Python package via CFFI and a node package via WASM, because we found that the different implementations for different languages were pretty buggy and would sometimes resolve expressions differently. Also the original project in JS seems to be largely unmaintained. The rust version goes to great lengths to reimplement weird JS typecasting so as to be fully compatible with the original.

    https://github.com/Bestowinc/json-logic-rs

    I am currently working on an extension to add functions and more strongly typed operators to avoid the hassle of JS’ type conversion.

  • jaspr

    Lisp for JSON (by ar-nelson)

  • I've been trying to invent a JSON-Lisp language like this for a long time. My first attempt was Jaspr (https://github.com/ar-nelson/jaspr), which has its own syntax that compiles to JSON. But I'm working on a new, Turing-incomplete variant called MiniJaspr that fills a similar niche to config languages like Jsonnet or Dhall.

  • json-logic-js

    Build complex rules, serialize them as JSON, and execute them in JavaScript

  • This is a fun project and a cute reinvention of Lisp, as people have already mentioned. I think people are snarky because if this was just a fun project, that would be the end of it. But it seems like JsonLogic is trying to be an actual thing.

    And this latter point is why it's just a monumentally terrible idea. I mean.. just look at the Custom Operations wiki[1]. It's honestly just horrible -- horrible -- and may actually even summon Zalgo[2]. This is exactly how we ended up with the XML nightmare of the late 90s/early 2000s. JSON is not meant to be programmable. Please, for the love of all that is holy, stop.

    [1] https://github.com/jwadhams/json-logic-js/wiki/Custom-Operat...

    [2] https://stackoverflow.com/a/1732454/243613

  • cel-spec

    Common Expression Language -- specification and binary representation

  • Having a standard way to share expressions does seem quite useful, especially when it's multilingual.

    [0]: https://github.com/google/cel-spec

  • jsonlogic

    Go Lang implementation of JsonLogic

  • I did a rules engine to the company that I work based in this specification, but using go language. It is a very successful project because our clients can create rules without tech people around in our frontend, it's very easy to translate our rules into json and store it.

    I even did a library to implement it in go language: https://github.com/diegoholiveira/jsonlogic

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • jsedn

    javascript implementation of edn

  • I presume jsedn is your library [0]? I was heretofore unaware of EDN, but it looks like a very clean fit for our needs. I will examine this more in depth, thank you.

    [0]: https://github.com/shaunxcode/jsedn

  • dhall-lang

    Maintainable configuration files

  • > but let's say we need to share these credential objects between different systems that do not have prior knowledge of how to evaluate the credential data

    Well, they _must_ have prior knowledge about it, because they must have to understand the concept of JsonLogic beforehand. So instead, you can just make these systems understand a proper programming language that can produce outputs. Something like https://github.com/dhall-lang/dhall-lang would probably be a much better option for this usecase.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts