2

I have a c# tree structure that will be passed to my JS code in order to populate a hierarchy of drop down lists.

Is there an efficient way to pass C# tree using JSON and then traverse the tree on the JS side(without me having implement a tree structure on both sides, since I already have a C# tree)?

2
  • We use jsTree at work and have a corresponding class for the nodes in C#, populate them in C# and voila. See jstree.com Commented May 16, 2012 at 20:19
  • I need a data structure, not an actual UI tree. Commented May 16, 2012 at 20:25

2 Answers 2

3

Is your C# tree structure serializable? There are several JSON serializers for .NET:

http://json.codeplex.com/

http://msdn.microsoft.com/en-us/library/bb410770.aspx

https://github.com/ServiceStack/ServiceStack.Text

etc...

Sign up to request clarification or add additional context in comments.

Comments

0

How about CIL to JavaScript converter?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.