Simplfy json api exclude validation logic