src/main/java/org/opensha/commons/geo/json/FeatureProperties.java
public static void propSerializeDefault(JsonWriter out, Object value) throws IOException {
		if (value == null) {
			out.nullValue();
		} else if (value instanceof Number) {
			out.value((Number)value);
		} else if (value instanceof Boolean) {
			out.value((Boolean)value);
		} else if (value instanceof Location) {
			Geometry.serializeLoc(out, (Location)value, Geometry.DEPTH_SERIALIZATION_DEFAULT);
		} else if (value.getClass().isArray()) {
			Object[] array;
			if (value.getClass().getComponentType().isPrimitive()) {
				if (value instanceof double[])
					array = ArrayUtils.toObject((double[])value);
				else if (value instanceof double[])
					array = ArrayUtils.toObject((double[])value);
				else if (value instanceof float[])
					array = ArrayUtils.toObject((float[])value);
				else if (value instanceof int[])
					array = ArrayUtils.toObject((int[])value);
				else if (value instanceof long[])
					array = ArrayUtils.toObject((long[])value);
				else if (value instanceof short[])
					array = ArrayUtils.toObject((short[])value);
				else if (value instanceof byte[])
					array = ArrayUtils.toObject((byte[])value);
				else if (value instanceof boolean[])
					array = ArrayUtils.toObject((boolean[])value);
				else
					throw new IllegalStateException();
			} else {
				array = (Object[])value;
			}
			out.beginArray();
			for (Object subValue : array)
				propSerializeDefault(out, subValue);
			out.endArray();
		} else if (value instanceof Collection<?>) {
			out.beginArray();
			for (Object subValue : (Collection<?>)value)
				propSerializeDefault(out, subValue);
			out.endArray();
		} else {
			out.value(value.toString());
		}
	}
/**
	 * Serializes the given value to the given JsonWriter, which should already have the name set. Numbers
	 * are serialized as numbers, nulls as nulls, booleans as booleans, collections as arrays, arrays as arrays,
	 * Locations as Locations, and everything else as toString().
	 * 
	 * @param out
	 * @param value
	 * @throws IOException
	 */
Serializes the given value to the given JsonWriter, which should already have the name set. Numbers
are serialized as numbers, nulls as nulls, booleans as booleans, collections as arrays, arrays as arrays,
Locations as Locations, and everything else as toString().

@param out
@param value
@throws IOException
Serializes the given value to the given JsonWriter which should already have the name set . Numbers are serialized as numbers nulls as nulls booleans as booleans collections as arrays arrays as arrays Locations as Locations and everything else as toString () . @param out @param value @throws IOException
public static void propSerializeDefault(JsonWriter out, Object value) throws IOException {
		if (value == null) {
			out.nullValue();
		} else if (value instanceof Number) {
			out.value((Number)value);
		} else if (value instanceof Boolean) {
			out.value((Boolean)value);
		} else if (value instanceof Location) {
			Geometry.serializeLoc(out, (Location)value, Geometry.DEPTH_SERIALIZATION_DEFAULT);
		} else if (value.getClass().isArray()) {
			Object[] array;
			if (value.getClass().getComponentType().isPrimitive()) {
				if (value instanceof double[])
					array = ArrayUtils.toObject((double[])value);
				else if (value instanceof double[])
					array = ArrayUtils.toObject((double[])value);
				else if (value instanceof float[])
					array = ArrayUtils.toObject((float[])value);
				else if (value instanceof int[])
					array = ArrayUtils.toObject((int[])value);
				else if (value instanceof long[])
					array = ArrayUtils.toObject((long[])value);
				else if (value instanceof short[])
					array = ArrayUtils.toObject((short[])value);
				else if (value instanceof byte[])
					array = ArrayUtils.toObject((byte[])value);
				else if (value instanceof boolean[])
					array = ArrayUtils.toObject((boolean[])value);
				else
					throw new IllegalStateException();
			} else {
				array = (Object[])value;
			}
			out.beginArray();
			for (Object subValue : array)
				propSerializeDefault(out, subValue);
			out.endArray();
		} else if (value instanceof Collection<?>) {
			out.beginArray();
			for (Object subValue : (Collection<?>)value)
				propSerializeDefault(out, subValue);
			out.endArray();
		} else {
			out.value(value.toString());
		}
	}
public static void propSerializeDefault ( JsonWriter out , Object value ) throws IOException { if ( value == null ) { out . nullValue ( ) ; } else if ( value instanceof Number ) { out . value ( ( Number ) value ) ; } else if ( value instanceof Boolean ) { out . value ( ( Boolean ) value ) ; } else if ( value instanceof Location ) { Geometry . serializeLoc ( out , ( Location ) value , Geometry . DEPTH_SERIALIZATION_DEFAULT ) ; } else if ( value . getClass ( ) . isArray ( ) ) { Object [ ] array ; if ( value . getClass ( ) . getComponentType ( ) . isPrimitive ( ) ) { if ( value instanceof double [ ] ) array = ArrayUtils . toObject ( ( double [ ] ) value ) ; else if ( value instanceof double [ ] ) array = ArrayUtils . toObject ( ( double [ ] ) value ) ; else if ( value instanceof float [ ] ) array = ArrayUtils . toObject ( ( float [ ] ) value ) ; else if ( value instanceof int [ ] ) array = ArrayUtils . toObject ( ( int [ ] ) value ) ; else if ( value instanceof long [ ] ) array = ArrayUtils . toObject ( ( long [ ] ) value ) ; else if ( value instanceof short [ ] ) array = ArrayUtils . toObject ( ( short [ ] ) value ) ; else if ( value instanceof byte [ ] ) array = ArrayUtils . toObject ( ( byte [ ] ) value ) ; else if ( value instanceof boolean [ ] ) array = ArrayUtils . toObject ( ( boolean [ ] ) value ) ; else throw new IllegalStateException ( ) ; } else { array = ( Object [ ] ) value ; } out . beginArray ( ) ; for ( Object subValue : array ) propSerializeDefault ( out , subValue ) ; out . endArray ( ) ; } else if ( value instanceof Collection < ? > ) { out . beginArray ( ) ; for ( Object subValue : ( Collection < ? > ) value ) propSerializeDefault ( out , subValue ) ; out . endArray ( ) ; } else { out . value ( value . toString ( ) ) ; } }
Serializes the given value to the given JsonWriter, which should already have the name set.
Serializes the given value to the given JsonWriter which should already have the name set .