Changes to support pluggable parsers

Now makes more use of JsonParser and JsonBufferParser type classes to
support pluggable parsers, no longer making any assumptions about the
dynamically-typed values wrapped inside Json and JsonBuffer objects.