JSON Parser Xojo plugin |

# JSONPrimitive.Clone Method

Makes a clone of the JSONPrimitive.

Clone(
deepClone as Boolean) as JSONPrimitive

#### Parameters

deepClone
  True if wanting deep cloning, else false.

#### Returns

JSONPrimitive
  The new primitive which is clone of the current one.

#### Remarks

The plugin has two kinds of copying: shallow and deep. There is a difference between these methods only for arrays and objects. Shallow copying only copies the first level value (array or object) and uses the same child values in the copied value. Deep copying makes a fresh copy of the child values, too. Moreover, all the child values are deep copied in a recursive fashion.
Copying objects preserves the insertion order of keys.

#### See Also

JSONPrimitive Class