Last active
December 25, 2015 14:38
-
-
Save hamnis/6992064 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"collection": { | |
"href": "http://example.com/events", | |
"template": { | |
"data": [ | |
{"name": "classifier", "prompt": "Classifier", "value": ""}, | |
{"name": "timestamp", "prompt": "Timestamp of event (ISO-8601 formatted)", "value": "" }, | |
{"name": "event", "object": {}} | |
] | |
}, | |
"links": [ | |
{"href": "urn:example:event", "rel": "profile"} | |
] | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
import net.hamnaberg.json; | |
public class TemplateUse { | |
public static void main(String[] args) { | |
Template template = Template.create(Arrays.asList( | |
Property.template("faff"), | |
Property.template("foof"), | |
Property.template("feee") | |
); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"template": { | |
"data": [ | |
{"name": "classifier", "prompt": "Classifier", "value": "faff"}, | |
{"name": "timestamp", "prompt": "Timestamp of event (ISO-8601 formatted)", "value": "2013-01-01T00:00:00.00Z" }, | |
{"name": "event", "object": { | |
"pakker": "faff", | |
"forsendelser_sendt": 4000 | |
}} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment