King JSON

Mar. 18th, 2010 11:38 am
juan_gandhi: (Default)
[personal profile] juan_gandhi
Seems like we here are agreeing to switch from our fixed binary data packet format to JSON. Can't believe my eyes.

Date: 2010-03-18 11:20 pm (UTC)
From: [identity profile] cema.livejournal.com
С json можно устроить duck typing, а строгая типизация при обмене данными через интернет редко бывает нужна.

Date: 2010-03-19 07:40 am (UTC)
From: [identity profile] jakobz.livejournal.com
Да ладно. Типы-то у данных будут в любом случае. Только вместо того, чтобы инфраструктура сама проверила и сказала что-то типа "в account.id лежит не int", где-то будет IsCorrectInt("account.id") в коде, а где-то - какой-нибудь IncorrectFormatException на выходе.

Date: 2010-03-19 08:47 am (UTC)
From: [identity profile] kashnikov.livejournal.com
Почти, так, да. http://martin.jambon.free.fr/json-static.html ;-)

Date: 2010-03-19 10:19 pm (UTC)
From: [identity profile] cema.livejournal.com
Тут уместна не столько типизация, сколько валидация.

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

May 2025

S M T W T F S
    1 2 3
456 7 8 9 10
11 121314151617
181920 21 222324
25 262728 293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 31st, 2025 05:00 am
Powered by Dreamwidth Studios