public void readFields (Object object, Object jsonData) {
		OrderedMap<String, Object> jsonMap = (OrderedMap)jsonData;
		Class type = object.getClass();
		ObjectMap<String, FieldMetadata> fields = typeToFields.get(type);
		if (fields == null) fields = cacheFields(type);
		for (Entry<String, Object> entry : jsonMap.entries()) {
			FieldMetadata metadata = fields.get(entry.key);
			if (metadata == null) {
				if (ignoreUnknownFields) {
					if (debug) System.out.println("Ignoring unknown field: " + entry.key + " (" + type.getName() + ")");
					continue;
				} else
					throw new JsonException("Field not found: " + entry.key + " (" + type.getName() + ")");
			}
			Field field = metadata.field;
			if (entry.value == null) continue;
			try {
				field.set(object, readValue(field.getType(), metadata.elementType, entry.value));
			} catch (IllegalAccessException ex) {
				throw new JsonException("Error accessing field: " + field.getName() + " (" + type.getName() + ")", ex);
			} catch (JsonException ex) {
				ex.addTrace(field.getName() + " (" + type.getName() + ")");
				throw ex;
			} catch (RuntimeException runtimeEx) {
				JsonException ex = new JsonException(runtimeEx);
				ex.addTrace(field.getName() + " (" + type.getName() + ")");
				throw ex;
			}
		}
	}