Re: How to describe complex json in Mongomapper

26 views
Skip to first unread message

Yadukrishnan K

unread,
Jul 17, 2013, 9:55:40 PM7/17/13
to mongo...@googlegroups.com
Did you find out how to do it? I am in a similar situation now.

On Monday, April 29, 2013 10:35:12 PM UTC+5:30, Santiago Ezcurra wrote:
Hi there !

I have this kind of document stored in MongoDB:

{
userid: "someuser",
email: "validemail",
location: "some city"
acls: {
           "canedit": false,
           "canview": true
        }
addresses: [{
                    street: "",
                    zipcode: ""
                 },
                {
                    street: "",
                    zipcode: ""
                }]
}

for the first attributes no problem, they all map to a key of some type....but for acls and addressses....is there a way to describe this explicitly in MongoMapper, or do I have to add them as opaque "Hash" and "Array" ?
Reply all
Reply to author
Forward
0 new messages