Welcome Guest, Not a member yet? Register   Sign In
FormatterInterface / JSONFormatter -> options
#1

Good day

I hope this is the correct place to request suggest this.

I wanted to ask if it wont be possible to add a way to or pass possible option parameters to the formatter
or have it as a variable for the formatter that can be set. I understand that one cant inforce it via the interface
as a variable

The problem actually is that I am using a ResponseTrait

to generate a response with
respondCreated

But the json options used for encode is not 100% what I need for my integration I am looking to use at least

JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK

the formatters default is set to

JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PARTIAL_OUTPUT_ON_ERROR
thus it almost there, but the JSON_NUMERIC_CHECK is very important for my integration. I truly dont want to force raw json_encode
coding but rather use the framework to handle this for me with the hope going forward it might use the best practice for me to generate the json.

In short as I understand I have to continue with the json_encode for now, but would want to ask if one such a option might be available in the future.

Thanks for this great product it alot of fun
Johannes
Reply




Theme © iAndrew 2016 - Forum software by © MyBB