You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have written a json api server in node, python, ps1, and had hopped to be finished writing one in C#, asp.net vnext today. But i cannot do so, because i do not know how to do three simple things in asp.net dnx ...
(1) Receive and return json strings via http
(2) Dynamically load method-X from some project.json/dnx App
(3) Dynamically run some arbitrary C#/dnx code at runtime
so i was thinking that in addition to:
samples/ConsoleApp
samples/HelloMvc
samples/HelloWeb
there also be a:
samples/HelloJson ~ to show how to make a simple json based http api on dnx
in addition to that i would like HelloJson to be able to dynamically require in or import at runtime a consistently named method from some other dnx Startup.cs / project, so that dynamically loaded method can be used to receive, processes, and asynchronously return the received json object after having done some work on it.
I have written the same json api server in a few languages, as an illustration of what i am trying to get working in csharp, i have pasted the powershell version below. As you can see it's all over and done with in less than 60 lines of code, and ideally is quicker to make than writing this post
hopefully that sort of thing [json APIs] can be done even more succinctly in asp.net vNext in C#, but i am totally unsure of what syntax to use and calls to make. I am hoping someone can whip up a "samples/HelloJson" to guide the way.
thanks
The text was updated successfully, but these errors were encountered:
This issue is being closed because it has not been updated in 3 months.
We apologize if this causes any inconvenience. We ask that if you are still encountering this issue, please log a new issue with updated information and we will investigate.
Hi
i could use some help with
how to make a simple [asp.net dnx] json API http server in csharp
so i'm reading http://docs.asp.net/en/latest/ and looking at
https://github.com/aspnet/Home/tree/dev/samples/latest
and searching the web for some sample code showing how to write a simple JSON api/server that receives and returns json on asp.net dnx
-- but still lack a starting point for such
I have written a json api server in node, python, ps1, and had hopped to be finished writing one in C#, asp.net vnext today. But i cannot do so, because i do not know how to do three simple things in asp.net dnx ...
(1) Receive and return json strings via http
(2) Dynamically load method-X from some project.json/dnx App
(3) Dynamically run some arbitrary C#/dnx code at runtime
so i was thinking that in addition to:
samples/ConsoleApp
samples/HelloMvc
samples/HelloWeb
there also be a:
samples/HelloJson ~ to show how to make a simple json based http api on dnx
in addition to that i would like HelloJson to be able to dynamically require in or import at runtime a consistently named method from some other dnx Startup.cs / project, so that dynamically loaded method can be used to receive, processes, and asynchronously return the received json object after having done some work on it.
I have written the same json api server in a few languages, as an illustration of what i am trying to get working in csharp, i have pasted the powershell version below. As you can see it's all over and done with in less than 60 lines of code, and ideally is quicker to make than writing this post
(i would have preferred to have the same method name in each case but couldn't quite get there in the case of powershell)
hopefully that sort of thing [json APIs] can be done even more succinctly in asp.net vNext in C#, but i am totally unsure of what syntax to use and calls to make. I am hoping someone can whip up a "samples/HelloJson" to guide the way.
thanks
The text was updated successfully, but these errors were encountered: