[DOCS-4662] Mention JSON format support for server configuration files Created: 14/Jan/15  Updated: 30/Oct/23  Resolved: 16/Jul/15

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Major - P3
Reporter: Andrew Ryder (Inactive) Assignee: Andrew Aldridge
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-16819 JSON configuration file Closed
Participants:
Days since reply: 8 years, 30 weeks, 1 day ago

 Description   

The YAML parser in the server can consume JSON syntax in the expected fashion, and although this is technically covered by the YAML specification it is an unexpected feature for many people. We have had several customers ask about this and some incorrect information has been supplied because the JSON support was unknown at the time.

It would be nice to advertise this powerful feature a little more, so I propose a note to this effect on this page:
http://docs.mongodb.org/manual/reference/configuration-options/#config-file-format

I would like to explicitly call out that the file can be written in JSON syntax and it will mean the same thing. For example, the following is exactly equivalent to the example configuration given on that page:

{
 systemLog: {
  destination: "file",
  path: "/var/log/mongodb/mongodb.log",
  logAppend: true,
 },
 storage: { journal: { enabled: true } },
 processManagement: { fork: true },
 net: {
  bindIp: "127.0.0.1",
  port: 27017,
 }
}



 Comments   
Comment by Githook User [ 21/Jul/15 ]

Author:

{u'username': u'i80and', u'name': u'Andrew Aldridge', u'email': u'i80and@foxquill.com'}

Message: DOCS-4662: Note that YAML is a superset of JSON

Signed-off-by: kay <kay.kim@10gen.com>
Branch: master
https://github.com/mongodb/docs/commit/96197bc9be6c0b7101a906ec5200ee92c4f2d756

Generated at Thu Feb 08 07:48:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.