简体   繁体   English

在ASP.NET中显示MySQL数据作为JSON,Resful Web服务?

[英]Displaying MySQL data as JSON in ASP.NET, Restful web service?

I Followed This to Read MySQL DataBase and Display Tables in ASP.net. 我按照此操作来读取ASP.net中的MySQL数据库和显示表。

But I want to Display Those Tables as the Part of JSON data, For Example : This is Employ Table, 但是我想将这些表显示为JSON数据的一部分,例如:这是Employ Table, 在此处输入图片说明

And I wnat to Display this Data in the form of JSON Like : 然后我希望以JSON Like的形式显示此数据:

[
{
    "id" : 1,
    "first_name" : "John",
    "last_name" : "Doe"
},
{
    "id" : 2,
    "first_name" : "Bob",
    "last_name" : "Smith"
},
{
    "id" : 3,
    "first_name" : "Jane",
    "last_name" : "Doe"
}
]

Here I want to Use the MySQL Tables as JSON Using ASP.net/Restfulweb services,So that it can be used in the part of Android and iPhone. 在这里,我想使用ASP.net/Restfulweb服务将MySQL表用作JSON,以便可以在Android和iPhone的一部分中使用它。

Any Suggestion please, 任何建议,

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM