Mappings: Fix Get field mapping api with pretty flag

Fix assertion only check ":{"

Closes #6552