Skip to content

Add general-purpose formatFeatures methods for parser, generator #122

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

Closed
cowtowncoder opened this issue Jan 11, 2014 · 2 comments
Closed

Comments

@cowtowncoder
Copy link
Member

Parsers and/or generators that handle non-JSON content often have additional features beyond core JSON features (and perhaps JSON format itself may, in future?).
Adding these in sub-classes for parser, generator, and JsonFactory works acceptably, but becomes problem at databinding level when trying to support per-call overrides for particular formats.

To support "general but specific" config features it is probably necessary to add a small set of supporting methods, so that ObjectWriter and ObjectReader can support overridability. This may include things like:

  • Introspection method for checking feature enum for format impl (to guard against mismatches)
  • Parser/Generator can have generic override (flags to set/clear with separate mask), possibly accessor
  • Parser/Generator base class can have format-feature field
  • ObjectReader/ObjectWriter can have methods for specifying overrides.
@cowtowncoder
Copy link
Member Author

I wish I had more time to get this ready for 2.4 (to be used by 2.5 modules); but as things are this won't be happening in time.

@cowtowncoder
Copy link
Member Author

Superseded by #196 (related but not exactly the same)

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