Configuring WCF data contract for proper JSON response

前端 未结 2 1267
囚心锁ツ
囚心锁ツ 2021-01-24 23:26

I manage a number of Bed & Breakfast websites and run a kind of booking engine to help the client do bookings directly on their website (as opposed to going to another site

2条回答
  •  无人共我
    2021-01-25 00:14

    Ok I found a solution. It required two steps:

    1. Use ExpandoObject to add properties to room_types Object dynamically
    2. Serialize the return object with Newtonsoft.Json and force the service to return plain text

提交回复
热议问题