klaxon icon indicating copy to clipboard operation
klaxon copied to clipboard

Explain how to use the jackson parser

Open spapas opened this issue 5 years ago • 2 comments

Can you provide a complete example on how to use the jackson parser? I.e how can I convert this code

val result = Klaxon()
    .parse<Person>("""
    {
      "name": "John Smith",
    }
    """)

to use the jackson parser? The info you have here (https://github.com/cbeust/klaxon#parsers) is not enough...

The built in parser is way to slow in debug mode, I am trying to parse a simple Json with just two elements and it takes more than 5 seconds in my android phone (!)

spapas avatar Mar 19 '19 11:03 spapas

I'm also unclear on how to use the Jackson parser. I've tried adding "implementation 'com.beust:klaxon-jackson:5.0.1'" to my gradle.build dependencies, but my build fails to locate any such package. Is there a different version number for the jackson plugin?

swordsmanluke avatar Apr 15 '19 03:04 swordsmanluke

I tried "com.beust:klaxon-jackson:5.0.5" as well, just in case, but no dice.

swordsmanluke avatar Apr 16 '19 04:04 swordsmanluke