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

(de)Serialization #1

Open
TheMarksman opened this issue Sep 25, 2015 · 0 comments
Open

(de)Serialization #1

TheMarksman opened this issue Sep 25, 2015 · 0 comments

Comments

@TheMarksman
Copy link

It would be nice if there were a canonical representation of the constraints:

{
    "constraints": {
        "box:a/right#": {
            "op": "eq",
            "left": "box:a#right",
            "right": ["box:a#left", "box:a#width"]
        },
        "box:a/bottom#": {
            "op": "eq",
            "left": "box:a#bottom",
            "right": ["box:a#top", "box:a#height"]
        },
        "box:a/left#": {
            "op": "eq",
            "left": "box:a#left",
            "right": 10
        },
        "box:a/top#": {
            "op": "eq",
            "left": "box:a#top",
            "right": [10, [0.5, "box:a/width"]]
        }
    }
}

with an api like this:

var k3 = K3()
    // add some constraints
    .json(seralized);

// manually add some constraints

// overload some constraints
k3.json(other_serialized);

var serialized = k3.json();

the resulting thing should be JSON-LD interpretable.

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

1 participant