API to plug-in extra parsers #7

Open
gossi opened this Issue Mar 21, 2013 · 0 comments

Comments

Projects
None yet
1 participant
Collaborator

gossi commented Mar 21, 2013

In a composer.json the extra node is reserved for third-party applications to put their stuff in. Third-party devs should be able to plug-in their parsers into composer to provide a nice API on their own, instead of the JsonObject and JsonArray types.

The API should be able to provide two endpoints.

  1. registering the parser:
ComposerPackage.addExtraParser("node", MyDomain.class);
  1. the retrieving:
ComposerPackage composer = new ComposerPackage(new File("composer.json"));
MyDomain domain = (MyDomain)composer.getExtra().getAsObject("node");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment