automatically generate javascript object model from c# object

前端 未结 4 915
南方客
南方客 2021-02-12 14:42

Looking for existing, proven, solutions for quickly generating a client-side javascript object model that represents an existing c# object. I imagine there is a

4条回答
  •  耶瑟儿~
    2021-02-12 14:55

    After countless searches I could not find anything close to what I’m looking for. Clearly everyone is caught up in the JSON buzz word the past few years and no one is auto-generating client-side object models. I looked at Codesmith and at T4 templates. Neither has any built in mechanisms for parsing code files. Both require you to jump into reflection to get at properties and their types which rests 100% on the developers shoulders. Which begs the question once you jump through that hoop of writing all that reflection code what benefit does Codesmith or T4 templates give you? Absolutely nothing.. You mind as well place your reflection code in a re-usable class library and call it from console application and that’s exactly what I’ve done.

提交回复
热议问题