Check if the data is JSON encoded or not.
Previously I had gone through the function to create a slug from the given string. Today, I came up with a problem. Using Jquery I used the same function to send two types of value: one being a string and another JSON encoded. Now I had to check them and use methods accordingly. For this, …