Example usage for com.google.gson JsonObject deepCopy

List of usage examples for com.google.gson JsonObject deepCopy

Introduction

In this page you can find the example usage for com.google.gson JsonObject deepCopy.

Prototype

@Override
public JsonObject deepCopy() 

Source Link

Document

Creates a deep copy of this element and all its children

Usage

From source file:com.balajeetm.mystique.util.gson.lever.JsonLever.java

License:Open Source License

/**
 * Deep clone./*from w  w  w  .  j a  v a  2 s .  c o  m*/
 *
 * @param source the source json
 * @return the deep clone of the json
 */
public JsonObject deepClone(JsonObject source) {
    return isNotNull(source) ? source.deepCopy() : source;
}