public static Map < String , String > jsonize ( String msgFormat , Object ... args ) { return ImmutableMap . of ( "error" , StringUtils . nonStrictFormat ( msgFormat , args ) ) ; }
Converts String errorMsg into a Map so that it produces valid json on serialization into response .