protected String compute() {
            if (element == null) return null;

            switch (element.getType()) {
                case OBJECT: return serializeObject();
                case ARRAY: return serializeArray();
                case STRING: return serializeString((String)element.getData());
                case NUMBER: return serializeNumber((Number)element.getData());
                case BOOLEAN: return serializeBoolean((Boolean)element.getData());
                case DATE: return serializeDate((Date)element.getData());
                case NULL:
                default: return "null";
            }
        }