How to convert Json property names of a given Json String to Title case using regular expression in Java


Recently I came across a requirement to convert json property names of given Json string to title case. Let me explain it with a example.

Assume you have below json string.



Now you want to convert json property names to title case or to make first letter of the property name to upper case. You can write the code as below.



You will get output as,



Comments

Popular posts from this blog

How to add standard and custom Metadata to PDF using iTextSharp

How to set and get Metadata to image using BitmapMetadata class in C#

How to generate direct line token to start a new conversation between your own client application and bot framework in Java