Adds support for formating json based on the scope