55

I would like to know how can I add Boon or Jackson parser to an android project using Gradle?

I found how to do so with GSON but couldn't find anything with Boon or Jackson.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Yosi199
  • 1,745
  • 4
  • 22
  • 47

2 Answers2

104

@Baldy answer is the same as:

implementation 'com.fasterxml.jackson.core:jackson-core:2.10.1'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.10.1'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.10.1'

Following android studio conventions. You can find the up to date version at: Maven Central Repository.

Vlad
  • 7,997
  • 3
  • 56
  • 43
Renato Probst
  • 5,914
  • 2
  • 42
  • 45
  • 7
    Recent versions of Android Studio use the keyword `implementation` instead of `compile` ` implementation 'com.fasterxml.jackson.core:jackson-core:2.7.3' implementation 'com.fasterxml.jackson.core:jackson-annotations:2.7.3' implementation 'com.fasterxml.jackson.core:jackson-databind:2.7.3' ` – Kobby Fletcher Nov 17 '18 at 07:51
74

Here's what have in my dependencies section in my build.gradle file for Jackson:

compile (
    [group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.4.1'],
    [group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.4.1'],
    [group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.4.1']
)

If you're trying to use jax-rs, you'll also need a few more:

    [group: 'com.fasterxml.jackson.jaxrs', name: 'jackson-jaxrs-base', version: '2.4.1'],
    [group: 'com.fasterxml.jackson.jaxrs', name: 'jackson-jaxrs-json-provider', version: '2.4.1'],
    [group: 'com.fasterxml.jackson.module', name: 'jackson-module-jaxb-annotations', version: '2.4.1']
Baldy
  • 2,002
  • 14
  • 14