Utility to serialize a normal Json array

Property definitions

json :: serialization_write $ Collection :: serialize_to_pure_json
	# Utility to serialize a normal Json array
	private fun serialize_to_pure_json(v: JsonSerializer)
	do
		v.stream.write "["
		var is_first = true
		for e in self do
			if is_first then
				is_first = false
			else
				v.stream.write ","
				if v.pretty_json then v.stream.write " "
			end

			if not v.try_to_serialize(e) then
				assert e != null # null would have been serialized
				v.warn("element of type {e.class_name} is not serializable.")
				v.stream.write "null"
			end
		end
		v.stream.write "]"
	end
lib/json/serialization_write.nit:307,2--327,4