Code example for JSONArray

Methods: get

		ClassWriter.appendClassDeclaration(fileBuffer, file, isAbstractModel);
		// Field declaration 
		// Since the root node is an array, this class will have only one field, named "list" 
		String key = FileUtils.getFileNameWithoutExtension(file) + "List";
		Object object = jsonArray.get(0);
		String fieldTypeName;
		if (object == null) {
			// Empty array 
			fieldTypeName = "Object";
		} else { 
			fieldTypeName = ClassMapper.getPrimitiveTypeName(object);
		if (fieldTypeName == null) {
			// Not a primitive. Recursion ahead. 
			fieldTypeName = mapField(file, object, fileBuffer, key, isPojo, cacheDuration);
Connect your IDE to all the code out there  Get Codota for Java