Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would you be interested in collaborating to create a more formal JSON Logic Specification? #1

Open
TotalTechGeek opened this issue Dec 7, 2024 · 2 comments

Comments

@TotalTechGeek
Copy link

Hey @dslmeinte 👋🏻

I'm going to come out the gate and express: I found your use-case for JSON Logic (CertLogic) quite cool 😂.

Developing a standard for vaccination rules? Very neat.

To catch you up, we recently kicked off a community effort to try to consolidate JSON Logic behaviors across implementations, resolve some of the common issues folks face, and develop a more formal spec so future projects have something to lean on -

Public Announcement here -
jwadhams/json-logic#47

GitHub Org here - https://github.com/json-logic

Once we consolidate behaviors and make backwards compatible tweaks to the specification to address common issues (like handling scope, empty keys, dots in keys, etc), and begin work on a formal specification, and build out compatibility tables, it is likely that the initiative will begin working on proposals for common extensions (like date handling, potentially).

Do you think you might be interested in participating in these discussions?

@dslmeinte
Copy link
Owner

Hi @TotalTechGeek !

Thanks for contacting me!

It's definitely a good idea to consolidate JSON Logic behaviors across implementations: the fact that these behaviors are (somewhat quite) different was the direct reason why I developed CertLogic. Even with the European Health Network's Interoperability Group leading this effort, it was impossible to mandate the use of certain implementations. Indeed, we've seen DCC-apps using JS, TS, Kotlin (on Android), Go, etc. Providing patched implementations of JSON Logic also was out of the question, especially because we something like 1.5 weeks to come up with an EU-wide standard, implement it, and deploy it.

CertLogic got around this by picking an extremely small subset — we didn't even include or! — of JSON Logic and specifying that to bits. (Something I can recommend for this effort: start with the core operators, and phrase other operators as much as possible in terms of those “atoms”.) We then added a couple of DCC-specific extensions, including – crucially, indeed – date handling.

I'm interested in sharing my experience and participating in some discussions, but my time is really quite limited. (And by limited, I mean: “I actually have -100 time available for it — for any unit of time”...) I've already shared my thoughts for https://github.com/orgs/json-logic/discussions/10, but don't expect too much from me — certainly no “actual work”.

@TotalTechGeek
Copy link
Author

TotalTechGeek commented Dec 8, 2024

I appreciate your input though!

It was actually seeing "CertLogic" that kinda helped push me past the line to try to kick off a community initiative.

It'd be nice if there was a portable standard that could execute anywhere, and community compatibility tables showing:

  • "Hey, all these guys support all the logic, arithmetic, and string operators"
  • "All these guys support the iterators"
  • "These guys support scopes"

And preferably have them all green 😬. I think with a community effort, it might make it easier to provide dev support to make that happen.

I also really want to try to apply the changes in a backwards compatible way, so we don't fracture the community.

p.s.

Some of the grammar talk is also driven by:
If JSON Logic was a well-supported generally executable AST across languages, I think we might see more adoption of it being used for those use-cases.

That might be a bit too pie in the sky; but I think it could help folks adapt some of their existing setups more easily if it supports some robust general capabilities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants