Skip to content
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

Not compatible with latest version of Jackson #5

Closed
redressrtech opened this issue Aug 16, 2015 · 6 comments
Closed

Not compatible with latest version of Jackson #5

redressrtech opened this issue Aug 16, 2015 · 6 comments

Comments

@redressrtech
Copy link

Would love to be able to use this with the latest version of Jackson so I can easily embed this in a spring application

@fakeh
Copy link

fakeh commented Oct 1, 2015

It doesn't work with >=2.4. I got it to work with 2.5.3 (I know there's a 2.6 stream already but I'm not targeting that yet, for other reasons) with the following instantiation of RisonFactory:

    ObjectMapper RISON = new ObjectMapper(new RisonFactory(){
        @Override public boolean canUseCharArrays() {
            return false;
        }

        @Override
        protected RisonParser _createJsonParser(Reader r, IOContext ctxt) throws IOException, JsonParseException {
            return new RisonParser(ctxt, _parserFeatures, _risonParserFeatures, r, _objectCodec,
                    _rootCharSymbols.makeChild(
                            (isEnabled(JsonFactory.Feature.CANONICALIZE_FIELD_NAMES) ? JsonFactory.Feature.CANONICALIZE_FIELD_NAMES.getMask() : 0)
                            |
                            (isEnabled(JsonFactory.Feature.INTERN_FIELD_NAMES) ? JsonFactory.Feature.INTERN_FIELD_NAMES.getMask() : 0)));
        }
    });

    String string = "(a:0,b:foo,c:'23skidoo')";
    Map map = RISON.readValue(string, Map.class);
    System.out.println(RISON.writeValueAsString(map));

@fakeh
Copy link

fakeh commented Oct 21, 2015

My changes also work with 2.6.2.

@Hronom
Copy link

Hronom commented Mar 25, 2016

Please add support for the latest version of Jackson - 2.7.2

@Hronom
Copy link

Hronom commented Sep 3, 2017

I'm trying to maintain alive version here https://github.com/Hronom/jackson-dataformat-rison
Currently it supports latest version 2.9.0, maven

@mike-unitskyi
Copy link
Contributor

@Hronom check latest releases if it's still valid

@mike-unitskyi
Copy link
Contributor

issue has been resolved

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

4 participants