Validating json string for Mandatory fields

I have a json string in my API that contains list of tags contains values and arrays. Among that few of them are mandatory and few of them are optional. Is there any way to find out that the user has passed correctly the mandatory field and its values in the json string?

I also need to return the list of mandatory fields which are omitted.

Please suggest.