Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Confused on MongoDB "JSON"

Confused on MongoDB "JSON"

Scheduled Pinned Locked Moved The Lounge
mongodbjsonhelpquestion
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Wonde TadesseW Offline
    Wonde TadesseW Offline
    Wonde Tadesse
    wrote on last edited by
    #1

    I keep getting/looking lot of irregular format of JSON output from MongoDB. Is it me and anyone else got the same issue ? It just bring lot of unnecessary recoding. So sad to see MongoDB abuses JSON like this.

    Wonde Tadesse

    M P 2 Replies Last reply
    0
    • Wonde TadesseW Wonde Tadesse

      I keep getting/looking lot of irregular format of JSON output from MongoDB. Is it me and anyone else got the same issue ? It just bring lot of unnecessary recoding. So sad to see MongoDB abuses JSON like this.

      Wonde Tadesse

      M Offline
      M Offline
      Marc Clifton
      wrote on last edited by
      #2

      Wonde Tadesse wrote:

      So sad to see MongoDB abuses JSON like this.

      First, isn't JSON inherently ripe for abuse?

      Wonde Tadesse wrote:

      MongoDB

      Second, why are you abusing yourself? One might think I should use the joke icon for this post, but I'm actually quite serious. Marc

      Latest Articles - APOD Scraper and Hunt the Wumpus Short video on Membrane Computing Hunt the Wumpus (A HOPE video)

      Wonde TadesseW 1 Reply Last reply
      0
      • M Marc Clifton

        Wonde Tadesse wrote:

        So sad to see MongoDB abuses JSON like this.

        First, isn't JSON inherently ripe for abuse?

        Wonde Tadesse wrote:

        MongoDB

        Second, why are you abusing yourself? One might think I should use the joke icon for this post, but I'm actually quite serious. Marc

        Latest Articles - APOD Scraper and Hunt the Wumpus Short video on Membrane Computing Hunt the Wumpus (A HOPE video)

        Wonde TadesseW Offline
        Wonde TadesseW Offline
        Wonde Tadesse
        wrote on last edited by
        #3

        Marc Clifton wrote:

        First, isn't JSON inherently ripe for abuse?

        Hum, Is it? Don't think so. It has simple and great spec. http://www.json.org/[^]

        Marc Clifton wrote:

        Second, why are you abusing yourself?

        No choice at this time, except working with it.

        Wonde Tadesse

        M 1 Reply Last reply
        0
        • Wonde TadesseW Wonde Tadesse

          Marc Clifton wrote:

          First, isn't JSON inherently ripe for abuse?

          Hum, Is it? Don't think so. It has simple and great spec. http://www.json.org/[^]

          Marc Clifton wrote:

          Second, why are you abusing yourself?

          No choice at this time, except working with it.

          Wonde Tadesse

          M Offline
          M Offline
          Marc Clifton
          wrote on last edited by
          #4

          Wonde Tadesse wrote:

          Don't think so. It has simple and great spec.

          Simple is good, but what annoys me about JSON is that, unlike XML, you can't publish a schema for it. You're left to the willy-nilly design of the developer and, unless the developer properly documents the JSON format (which seems rare in my experience) you really have no idea what the options are. That said, the same thing is true for XML, except that you CAN create an XSD (and should, in my opinion). Granted, there's some attempts at using JSON to create a JSON schema. But frankly, chalk up most of my rant to just being old school and liking structures defined, databases with real relationships and normalization, etc. Marc

          Latest Articles - APOD Scraper and Hunt the Wumpus Short video on Membrane Computing Hunt the Wumpus (A HOPE video)

          Wonde TadesseW 1 Reply Last reply
          0
          • Wonde TadesseW Wonde Tadesse

            I keep getting/looking lot of irregular format of JSON output from MongoDB. Is it me and anyone else got the same issue ? It just bring lot of unnecessary recoding. So sad to see MongoDB abuses JSON like this.

            Wonde Tadesse

            P Offline
            P Offline
            Pete OHanlon
            wrote on last edited by
            #5

            MongoDB uses BSON rather than JSON. The extensions are to provide support for the richer types you get from BSON rather than JSON.

            Wonde TadesseW 1 Reply Last reply
            0
            • P Pete OHanlon

              MongoDB uses BSON rather than JSON. The extensions are to provide support for the richer types you get from BSON rather than JSON.

              Wonde TadesseW Offline
              Wonde TadesseW Offline
              Wonde Tadesse
              wrote on last edited by
              #6

              According to their document it uses both. http://www.mongodb.com/json-and-bson[^]. Moreover .NET MongoClient library has

              collection.FindOne().ToJson()

              Which isn't presenting good format for my case.

              Wonde Tadesse

              1 Reply Last reply
              0
              • M Marc Clifton

                Wonde Tadesse wrote:

                Don't think so. It has simple and great spec.

                Simple is good, but what annoys me about JSON is that, unlike XML, you can't publish a schema for it. You're left to the willy-nilly design of the developer and, unless the developer properly documents the JSON format (which seems rare in my experience) you really have no idea what the options are. That said, the same thing is true for XML, except that you CAN create an XSD (and should, in my opinion). Granted, there's some attempts at using JSON to create a JSON schema. But frankly, chalk up most of my rant to just being old school and liking structures defined, databases with real relationships and normalization, etc. Marc

                Latest Articles - APOD Scraper and Hunt the Wumpus Short video on Membrane Computing Hunt the Wumpus (A HOPE video)

                Wonde TadesseW Offline
                Wonde TadesseW Offline
                Wonde Tadesse
                wrote on last edited by
                #7

                I see your point. However this doesn't mean you shouldn't comply with the existing spec. Atleast try to make it work with existing spec.

                Wonde Tadesse

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups