Then pass only the key to toUpperCase() and pass the value to toLowerCase()... I don't see what the problem is. Do you have any code that you wrote that is not working as you expect it to work? Without seeing what you're trying to do in code, it's kind of hard to not make assumptions and give you a helpful answer. And I don't mean the code that you already gave because that doesn't do anything at all to separate out the keys from the values and work with toUpperCase/toLowerCase. Try to write some code that isolates the keys and values first, then apply the case conversion methods.
Edit - You can look at the java.util.Scanner and/or the java.util.regex API. - Since you are using Jackson, read the API and the tutorials to see how you can isolate the keys and values. It's pretty straightforward to apply the case conversion methods from there.