Announcement Announcement Module
Collapse
No announcement yet.
Capturing/Returning JSON to MongoDB without binding to a model? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Capturing/Returning JSON to MongoDB without binding to a model?

    Hello,

    We have a particular API our developers have been using here for years that they use to store arbitrary metadata about our users.

    We recently converted it over to a JSON data structure, but, instead of just dumping this into a mysql table as a binary blob, i want to instead capture this in mongo so we can start making use of this customer metadata.

    This is probably the only one case we have in our infrastructure where the data does not cleanly bind to a model.

    Over the years this has been used and abused and it would be extremely difficult to write a POJO to model the data.

    My question is: Can I store/retrieve this through my SpringMVC framework without assigning a model to it? I haven't tried playing with this yet and before I spun my wheels for hours, I figured I'd ask what the common approach to this problem is.

    Thanks in advance.

  • #2
    Originally posted by yamasaki760 View Post
    Hello,

    We have a particular API our developers have been using here for years that they use to store arbitrary metadata about our users.

    We recently converted it over to a JSON data structure, but, instead of just dumping this into a mysql table as a binary blob, i want to instead capture this in mongo so we can start making use of this customer metadata.

    This is probably the only one case we have in our infrastructure where the data does not cleanly bind to a model.

    Over the years this has been used and abused and it would be extremely difficult to write a POJO to model the data.

    My question is: Can I store/retrieve this through my SpringMVC framework without assigning a model to it? I haven't tried playing with this yet and before I spun my wheels for hours, I figured I'd ask what the common approach to this problem is.

    Thanks in advance.
    Store it as a map

    Comment


    • #3
      Originally posted by SigmundL View Post
      Store it as a map
      Thank you, worked perfectly.

      Comment

      Working...
      X