8000 Predicate validation in JBIND · Issue #10 · atlas-engineer/njson · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Predicate validation in JBIND #10
Open
@aartaka

Description

@aartaka

jbind is quite useful already, but it is somewhat hard-coded in functionality. Allowing arbitrary predicates is probably the biggest customization that can happen to it, so that one can do:

(njson:jbind #(1 #'evenp 3 (lambda (n) (= n 4)) five)
    five)

And make sure that an array like #(1 8 3 4 X ...) passes the check and returns the provided X.

Problematic moment is: function and lambda forms conflict with optional value parsing due to being symbol conses.

So it's either hard-coding the rules for function, lambda, quote etc. (which is really unreliable), or coming up with a new syntax. Risking too much bloat here...

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0