Ahmed Nawaz
Ahmed Nawaz

Reputation: 1644

Which json style is best for Android + iOS apps

I am developing an app for iOS and Android in both apps I am going to use web services. I got two types of services from my developer. One Return WCF data and other return HTTP header.

1- WCF Style

{"d":[
{"Key":"Data Key 1", "Value":"Value 1"},
{"Key":"Data Key 2", "Value":"Value 2"},
{"Key":"Data Key 3", "Value":"Value 3"},
{"Key":"Data Key 4", "Value":"Value 4"},
{"Key":"Data Key 5", "Value":"Value 5"}]}

2- Http Header Style:

{"Data Key 1":"Value 1","Data Key2 ":"Value 2","Data Key2 ":"Value 2","Data Key3 ":"Value 3","Data Key4":"Value 4"}

My Question is that which one i have to use for my apps???? and Which one is Standard jSon format??

I already have consume no. 2 types of services in my Android App.

Upvotes: 0

Views: 821

Answers (1)

Jason Lee
Jason Lee

Reputation: 3250

In our app, Android or iOS, we check the JSON format on the link.

So, I think both of your sample are valid and correct.

In the real project, we use WCF Style JSON, for we think it has a better organization.

Upvotes: 1

Related Questions