# belongsTo serialize id to JSON as string

**URL:** <https://discuss.emberjs.com/t/belongsto-serialize-id-to-json-as-string/7687>\
**Category:** Uncategorized\
**Created:** [April 1, 2015, 9:28am UTC](https://discuss.emberjs.com/t/belongsto-serialize-id-to-json-as-string/7687 "2015-04-01T09:28:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![acero](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@acero](https://discuss.emberjs.com/u/acero)\
**Post date:** [April 1, 2015, 9:28am UTC](https://discuss.emberjs.com/t/belongsto-serialize-id-to-json-as-string/7687/1 "2015-04-01T09:28:25Z")

</div>

Hi,

Why is ember serializing foreign key id as string in JSON?

model:

cityId: DS.belongsTo(‘city’, {async: true}), //serialize to JSON as string

cityId: DS.attr(‘number’), //serialize to JSON as number

Please help
