-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Server Security
-
(copied to CRM)
We have extended json syntax for most types, see http://docs.mongodb.org/manual/reference/mongodb-extended-json/
There are two flavors: "strict" and "shell" mode.
Yet when certain types are printed in the log file, they don't comply to either of these formats, instead using arbitrary syntax that is hard to parse and cannot be simply copy&pasted back into the shell.
All types should be printed as strict or shell syntax in the log for consistency. Preferably shell syntax since mongo shell can't yet understand strict syntax (see related ticket, SERVER-6813).
Examples:
Timestamp
shell
> Timestamp(1, 0) Timestamp(1, 0)
log file
Timestamp 0|0
NumberLong
shell
> NumberLong("9223372036854775807") NumberLong("9223372036854775807")
log file (would be misinterpreted as floating point value)
9223372036854775807
BinData
shell
> BinData(3, "0123456789ABCDEFFEDCBA9876543210") BinData(3,"0123456789ABCDEFFEDCBA9876543210")
log file (quotes missing)
BinData(3,0123456789ABCDEFFEDCBA9876543210)
And so on.
- is related to
-
SERVER-6813 Shell support for Extended JSON
- Closed
-
SERVER-13209 Ensure extended shell JSON ouput format round trips through the shell
- Closed
- related to
-
SERVER-16620 escape double quotes \" when printing strings to log
- Closed