Questions tagged [mongo-jackson-mapper]

42 questions
0
votes
1 answer

Generic parsing inconsistent response with Jackson into String or custom Object

I get two different kind of response json in two different scenario from single RESTful web service, how to parse the following response json with Jackson?? response:{ result:"0" } and response:{ result :{ fname: "abc", lname:…
0
votes
1 answer

Jackson, hashed password not being mapped

I have the following collection "player" { "_id" : ObjectId("5426efb844ae829d1dcdaa6d"), "username" : "Foobar", "password" : "0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33", "gameIds" : [ "5426f10544ae8502f731d8a0" ] } It…
Shervin Asgari
  • 23,901
  • 30
  • 103
  • 143
0
votes
1 answer

MongoDB - MongoJack find and remove

I am completely new to MongoDB and MongoJack. I have this collection called pbf { "_id" : ObjectId("541ea72044ae1b4043e9ccba"), "name" : "First civ game", "type" : "WAW", "numOfPlayers" : 4, …
Shervin Asgari
  • 23,901
  • 30
  • 103
  • 143
0
votes
3 answers

java.text.ParseException: Unparseable date "Fri Sep 12 23:22:46 IST 2014"

I am using jackson mapper to map the json request to an java object directly. To map the date i am using CustomDateSerializer and CustomDateDeSerializer in the getter and setter respectively. public class CustomJsonDateSerializer extends…
Hemanth S R
  • 1,115
  • 2
  • 16
  • 27
0
votes
1 answer

Jackson ignore attribute on sub class that is 3:d party

I have a 3d library that is included in a class i uses that i want to serialize to json with jackson. I want to jackson the object A, but ignore the field in Class C without being able to change the source code on Class B and C , is this…
Trind
  • 1,583
  • 4
  • 18
  • 38
0
votes
0 answers

object mapper conversion issue when string contains'\/' patterns

I have following type of token that as to be send as it is in request. //token contains following value token = "ABCD/saljljlkljljljl"; class Token{ public String token; public String getToken() { return token; } public…
developer
  • 401
  • 1
  • 4
  • 15
0
votes
1 answer

find set of records in mongodb/jackson driver user a List of ids?

once again I'm spending a lot of frustrating hours trying to figure out something which sounds rudimentary with mongodb and jackson client but being unsuccessful.sigh! So I have a list of User ids and I'm trying to find the users which match those…
nightograph
  • 2,179
  • 5
  • 31
  • 49
0
votes
1 answer

is this query a valid mongo jackson mapper query?

I'm trying to get a user by email or username from the database, imagine functionality that a user can login either with unique alias or email address, I thought the following would work but it doesn't, User user = …
nightograph
  • 2,179
  • 5
  • 31
  • 49
0
votes
1 answer

Errors while calling mongo-jackson mapper from RESTEasy method

Been on this one for a few days now. I have a java servlet, built with maven that will be deployed to Jetty (an older version). It's a RESTful web service on Jetty built with RESTEasy and Jackson, and the Jackson Mongo Mapper to connect me to…
Matt M
  • 185
  • 1
  • 1
  • 8
0
votes
0 answers

How to insert object into collection if it doesn't exist using mongo-jackson-mapper?

I can't find an API for this simple operation. What I need to do is insert a new document if it doesn't exist already, so I'm trying to use "upsert": JacksonDBCollection collection = …
Michael Spector
  • 36,723
  • 6
  • 60
  • 88
-1
votes
2 answers

mapper.readValue(json, Hello.class) return object is not equals to expected object

I'm comparing the two objects but the Expected object is not equal to the actual one. but they have the same values. Please provide some help. Why ? public testJsonToObject() { Hello expected = new Hello(); String json =…
Shoaib Khan
  • 51
  • 1
  • 10
-1
votes
1 answer

Extract specific field from json and deserialize it according to speicific Class

I have a piece of json string which I would like to extract specific fields, and it field exist I would like to deserialize it into a specific type (Class). So far I have tried using ObjectMapper, but the problem with it that it designed to work in…
Shvalb
  • 1,835
  • 2
  • 30
  • 60
1 2
3