Attributes in API

brm7 years ago

Hello, I need add some attribute data to user creation using API, How I should send data for attribute field?
I think is a json object, my object is this:

{
"owner":"1",
"child": "2"
}

But I receive this exception:

Can not construct instance of java.util.LinkedHashMap: no String-argument constructor/factory method to deserialize from String value ('{}')
 at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@56e6d0a5; line: 1, column: 70] (through reference chain: org.traccar.model.User["attributes"])

thank you

Anton Tananaev7 years ago

What are you using to send request? Can I see full payload?

brm7 years ago

Thank you, my solution was send json data like a string and not like a object.