public abstract class SerializationUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
serializeToJsonSafely(Object value)
Serializes the given object into pseudo-JSON meaning it's trying to create a JSON representation as far as possible
but falling back to the given object's
Object.toString() method if it's not serializable. |
public static String serializeToJsonSafely(Object value)
Object.toString()
method if it's not serializable. Useful for
printing raw DBObject
s containing complex values before actually converting them into Mongo native types.value
- Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.