Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-4662

Mention JSON format support for server configuration files

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • None
    • manual
    • None

    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,
       }
      }

      Attachments

        Activity

          People

            andrew.aldridge@mongodb.com Andrew Aldridge
            andrew.ryder@mongodb.com Andrew Ryder (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              8 years, 30 weeks, 1 day ago