@@ -0,0 +1,858 @@
+// Copyright (c) 2003-2014, Jodd Team (jodd.org). All Rights Reserved.%0A%0Apackage jodd.json.impl;%0A%0Aimport jodd.json.JsonContext;%0Aimport jodd.json.TypeJsonSerializer;%0A%0A/**%0A * Base class for all JSON objects and arrays serializers.%0A * Detects circular dependencies and pushes value to current type%0A * context of provided json context.%0A */%0Apublic abstract class ValueJsonSerializer%3CT%3E implements TypeJsonSerializer%3CT%3E %7B%0A%0A%09/**%0A%09 * Detects circular dependencies and pushes value as current%0A%09 * type context.%0A%09 */%0A%09public final void serialize(JsonContext jsonContext, T value) %7B%0A%09%09if (jsonContext.pushValue(value)) %7B%0A%09%09%09// prevent circular dependencies%0A%09%09%09return;%0A%09%09%7D%0A%0A%09%09serializeValue(jsonContext, value);%0A%0A%09%09jsonContext.popValue();%0A%09%7D%0A%0A%09/**%0A%09 * Performs the serialization of the value.%0A%09 */%0A%09public abstract void serializeValue(JsonContext jsonContext, T value);%0A%7D

Add ValueJsonSerializer - base class for all JSON values