October 29, 2014

วิธีลัดในการสร้างไฟล์ C# class จาก JSON responses

Quckly Generate C# Classes from JSON Responses



วีดีโอสั้น ๆ แสดงวิธีการที่ developer ที่ใช้ Web Essentials Visual Studio Plugin, และใช้ quick tip กับ quickly generate typed C# classes โดยใช้การทำงานร่วมกับ JSON Responses.  โดนวิธีนี้เป็นวิธีที่สะดวกในการสร้าง application ที่เรียกใช้ REST API ที่ return ค่าเป็น JSON responses.


[00:48] - ตัวอย่าง HTTP Client ที่เรียกใช้ REST API

[01:01] - Generate C# file จาก declaring classes

[01:40] - ตรวดจับ JSON Response ในการทำ Debugger

[01:56] - Paste ตัว JSON Classes โดยใช้ web essentials

[02:34] - การเรียกใช้ JSON Class ภายใน code โปรแกรม


ข้อมูลจาก http://channel9.msdn.com/Series/Windows-Store-Developer-Solutions/Quckly-Generate-C-Classes-from-JSON-Responses

No comments:

Post a Comment