gedi-geode-extensions-core/src/main/java/gedi/solutions/geode/operations/functions/ImportJsonFunction.java
private boolean importRegion(Region<Object, Object> region)
			throws Exception
	{
		JsonNode node, keyNode, valueNode, keyClassName, valueClassName;

		Object key, value;

		if (PartitionRegionHelper.isPartitionedRegion(region))
		{
			region = PartitionRegionHelper.getLocalData(region);
		}

		// get first

		ObjectMapper mapper = new ObjectMapper();

		// Configure to be very forgiving
		// mapper.configure(Feature.FAIL_ON_INVALID_SUBTYPE, false);
//		mapper.configure(Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
//		mapper.configure(Feature.FAIL_ON_NULL_FOR_PRIMITIVES, false);
//		mapper.configure(Feature.FAIL_ON_NUMBERS_FOR_ENUMS, false);
//
//		KeyDeserializers keyDeserializers = new KeyDeserializers()
//		{
//
//			@Override
//			public KeyDeserializer findKeyDeserializer(JavaType javatype,
//					DeserializationConfig deserializationconfig,
//					BeanDescription beandescription, BeanProperty beanproperty)
//					throws JsonMappingException
//			{
//				return new DefaultKeyDeserializer();
//			}
//		};
//
//		mapper.setDeserializerProvider(mapper.getDeserializerProvider()
//				.withAdditionalKeyDeserializers(keyDeserializers));

		// read JSON file
		String filePath = new StringBuilder(this.directoryPath)
				.append(fileSeparator).append(region.getName()).append(suffix)
				.toString();

		File file = new File(filePath);

		if (!file.exists())
		{
			LogManager.getLogger(getClass())
					.info(file.getAbsolutePath() + " does not exists");
			return false;
		}

		try(Reader reader = Files.newBufferedReader(file.toPath(), StandardCharsets.UTF_8))
		{

			// TokenBuffer buffer = new TokenBuffer
			JsonNode tree = mapper.readTree(reader);

			Iterator<JsonNode> children = tree.elements();

			if (children == null || !children.hasNext()) {
				return false;
			}

			while (children.hasNext())
			{
				node = children.next();
				keyNode = node.get("key");
				valueNode = node.get("value");
				keyClassName = node.get("keyClassName");
				valueClassName = node.get("valueClassName");

				key = mapper.readValue(keyNode.traverse(),
						forClassName(keyClassName));
				value = mapper.readValue(valueNode.traverse(),
						forClassName(valueClassName));

				region.put(key, value);
			}
			return true;
		}


	}
private boolean importRegion(Region<Object, Object> region)
			throws Exception
	{
		JsonNode node, keyNode, valueNode, keyClassName, valueClassName;

		Object key, value;

		if (PartitionRegionHelper.isPartitionedRegion(region))
		{
			region = PartitionRegionHelper.getLocalData(region);
		}

		// get first

		ObjectMapper mapper = new ObjectMapper();

		// Configure to be very forgiving
		// mapper.configure(Feature.FAIL_ON_INVALID_SUBTYPE, false);
//		mapper.configure(Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
//		mapper.configure(Feature.FAIL_ON_NULL_FOR_PRIMITIVES, false);
//		mapper.configure(Feature.FAIL_ON_NUMBERS_FOR_ENUMS, false);
//
//		KeyDeserializers keyDeserializers = new KeyDeserializers()
//		{
//
//			@Override
//			public KeyDeserializer findKeyDeserializer(JavaType javatype,
//					DeserializationConfig deserializationconfig,
//					BeanDescription beandescription, BeanProperty beanproperty)
//					throws JsonMappingException
//			{
//				return new DefaultKeyDeserializer();
//			}
//		};
//
//		mapper.setDeserializerProvider(mapper.getDeserializerProvider()
//				.withAdditionalKeyDeserializers(keyDeserializers));

		// read JSON file
		String filePath = new StringBuilder(this.directoryPath)
				.append(fileSeparator).append(region.getName()).append(suffix)
				.toString();

		File file = new File(filePath);

		if (!file.exists())
		{
			LogManager.getLogger(getClass())
					.info(file.getAbsolutePath() + " does not exists");
			return false;
		}

		try(Reader reader = Files.newBufferedReader(file.toPath(), StandardCharsets.UTF_8))
		{

			// TokenBuffer buffer = new TokenBuffer
			JsonNode tree = mapper.readTree(reader);

			Iterator<JsonNode> children = tree.elements();

			if (children == null || !children.hasNext()) {
				return false;
			}

			while (children.hasNext())
			{
				node = children.next();
				keyNode = node.get("key");
				valueNode = node.get("value");
				keyClassName = node.get("keyClassName");
				valueClassName = node.get("valueClassName");

				key = mapper.readValue(keyNode.traverse(),
						forClassName(keyClassName));
				value = mapper.readValue(valueNode.traverse(),
						forClassName(valueClassName));

				region.put(key, value);
			}
			return true;
		}


	}
------------------------------------------------