如何知道json对象的大小?

时间:2015-04-21 15:36:07

标签: json mongodb

这是我在mongodb上的记分板应用程序的架构。现在我无法理解一件事情,我怎样才能确保mongodb的大小不会高于16mb,条件是:

  1. 你只能组建10支球队
  2. 一支球队只能有12名球员。
  3. 积分表将是非常小的团队
  4. 匹配和历史数组将有大量数据
  5. 所以这就是问题

    championships{
        "ChampionShip_Name":"IPL",
        "overs":"10",
        "config":[true,true,true],
        "NoofTeams":12,
        "teams":[{
                "teamname":"chennai superkings",
                "players":[{
                    "playername":"sachin tendulkar",
                    "skills":["batting","bowling"],
                    "position":"opener"
                }]
                },{
                "teamname":"rajasthan royals",
                "players":[{
                    "playername":"virendra sehwag",
                    "skills":["batting","bowling"],
                    "position":"opener"
                }]
                }],
        "pointstable":[
    
        ],
        "matchlist":[{
        "team1":"chennai superkings",
        "team2":"rajasthan royals",
        "winner":"rajasthan royals",
        "winningtag":"rajsthan royals won by 10"
        "inining1":["123","45.5","5"],
        "inining2":["124","12","4"]
        }]
    }
    Scoreboard{
    team1:"indian",
    team2:"pakistan",
    inings:[{
    batting:{
    },
    bowling:{
    }
    },{
    batting:{
    },
    bowling:{
    }
    }
    ]
    }
    

0 个答案:

没有答案