My example JSON input looks like this:
"JobName":"Test Job 1", "events":[ { "features":[], "InputHiveTable":"uilog_uiclientlogdata", "eventColumn":"command", "name":"edu.apollogrp.classroom.discussion.client.events.CreateDiscussionEvent" },
Consider the field "InputHiveTable" , it can be in all uppercase letters INPUTHIVETABLE , all lowercase letters INPUTHIVETABLE or a mixture of both, as it is now.
I am currently reading the field as follows (in Java):
JSONObject jsonObject = (JSONObject) obj; JSONArray events = (JSONArray) jsonObject.get("events"); String InputHiveTable = (String)event.get("InputHiveTable");
So my question is how to look for the "InputHiveTable" field while ignoring this case. I am using JSON Simple libraries.
Chaos source share