We’ve moved this topic into the Developer area, so all now matches expectations.
Thanks, @iestockdale for moving it into the developer discussion.
That’s correct Jon, special characters will break the json.
\" quotation mark \\ reverse solidus \b backspace \f formfeed \n newline \r carriage return \t horizontal tab
They need to be escaped as mentioned in http://json.org/. Thanks for bringing this up.
Thanks Jon and Nithin. Nithin, when you are able, please provide example output showing exactly what this will (or already does) look like in new qstat output.
I’ve attached sample output for the special case (where the user variables contains special characters) with the document -
EDD for enhancing qstat output.
Have you tried running your examples through a JSON parser like the one in Python?
Do you get your original input back when you re-encode the dictionary?
Specifically, have you tried calling json.dump() or json.dumps() to serialize the decoded dictionary back into JSON format?
Yes. I’m getting the results in json format. I’ve attached the results with ticket.
Does the EDD need tp specifically call out that the new interface options can also be used with job history options (-x, -H) when -f is also used, or is that implied by the applicable qstat usage statement already:
qstat [-f] [-J] [-p] [-t] [-x] [-E] [ job_identifier… | destination… ]
There is a note section at the bottom of the page which states
All the three new interfaces will be supported only with full set of attributes (" -f " option). This would include every vaild combination of "-f"
So the new interfaces will work with history jobs when you use the
qstat -xf option. The
H option is not supported with
I read somewhere in your EDD that backslash (\) will be used to escape the given delimiter character if it appears in the output. Consider looking into this EDD:
For Windows, please use the caret (^) as the escape character as the backslash is actually a legal pathname charcter under Windows.
Thanks, @bayucan. It should have resulted in a potential bug if PP-668 gone in since I’m looking for the escape character (
\ today) while parsing for json to print values without any escaping.
However, I prefer to have the same escape character for all platforms. So Caret will be used as the escape character in DSV format instead of Backslash.
My earlier conclusion was wrong regarding the escape character in DSV. It is better to keep the same escaping character used with qstat -f. So DSV will use
backslash on Linux and
Caret on Windows for consistency.
Sounds good. EDD looks fine now.