Title: Does bson require more space then json when sending decimal data?
Tags: java;json;bson
Question: I am trying to compare bson serialization with json like that:

```{
    "startAmount": 1000,
    "amounts": [
        1000,
        15000
    ],
    "stakes": [
        0.0395,
        0.0062
    ],
    "step": 10
}
```

Note that actual size for ```amounts``` and ```stakes``` is 1500. ```amounts``` are between 1000 and 15000, ```stakes``` just random value from ```0.0001d``` to ```0.05d```. So when this json was passed to online bson serializer I got file 31.5 Kb, but original json size is 17.4Kb. In theory bson much smaller when it comes to pack numbers. 

So what is wrong? Does this result correct or there is some mistake in packaging? Or may be bson require more space when numbers with dot are packaged?

Comment: Why should BSON be smaller than JSON (unless the JSON contains a lot of spacing and indentation)? A `double` is 8 bytes. The string `0.0395` is only 6 bytes. BSON is optimized for parsing speed, not for size.

Comment: Related: http://stackoverflow.com/questions/12601890/compare-json-and-bson



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 2, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2016:00:07/27/16', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<java><json><bson>', 'Title': 'Does bson require more space then json when sending decimal data?', 'ViewCount': 29, 'id': 38602915, 'user_AboutMe': None, 'user_AccountId': 1301815.0, 'user_DisplayName': 'Cherry', 'user_Reputation': 29160.0, 'user_Views': 1668.0, 'user_id': 1251549.0}}