Releases
0.6
Major Changes
Parser and Consumer have been merged.
Parser no longer wraps its results with Try
; exceptions will be thrown. Use parser.wrapSafe
to emulate old behavior.
xml-spac
has been split into separate modules: spac-core
, xml-spac
, and json-spac
All XML-specific features of Parser and Splitter now exist in XMLParser and XMLSplitter
If you were using Parser
, you should now use XMLParser
.
except for Parser.constant
If you were using Splitter
, you should now use XMLSplitter
.
New JSON-specific features exist on JsonParser and JsonSplitter
The Splitter
trait and companion still exist, but only with general-purpose methods
The Parser
companion now only contains generic parser constructors. For XML or JSON-specific parsers, use the XMLParser or JsonParser objects.
Removed the homemade Functor
implementation, and the FunctorSyntax
convenience methods. Possible integration with Cats at a later date.
Minor Changes
Most of the Consumer/Parser
and Transformer
convenience constructors have been lower-cased
ContextMatcher now takes an Elem
type parameter (to support matching against JSON and XML contexts)
The internals of Splitter
have some new abstractions that make it easier to create custom splitters
The new FromHandlerFactor
typeclass makes it easier to convert between Parser and Consumer
Deprecated Splitter#through
, renamed it to map
Changed some of the internal event management classes to better support JSON events/contexts
New Features
JSON support via json-spac
Add Transformer#transform
for #16
Splitter now supports flatMap
-ing with Transformer
(see Example6 for why this is helpful)
ConsumableLike now exposes an Iterator for pull-style parsing
Add Parser#orElse
to handle varying input formats
Add Parser#interruptedBy
to help with certain followedBy
scenarios (see Example7)
Add Parser#beforeContext
as a convenience for Parser#interruptedBy
You can’t perform that action at this time.