Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to serialize Tree object?

How to serialize Tree object?

Scheduled Pinned Locked Moved C#
data-structurescsharplinuxxmljson
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Oscar K
    wrote on last edited by
    #1

    I create Data Tree object by my PPL language (Parenthesis Programming Language) for .NET. Here PPL code with commentary, I hope it is clear what I do:

    //Creation Tree
    var(x[0])(z) // variables x ,z

    array(y[3]) // array y
    set(y[0])(zero)(0)
    set(y[1])(one)(1)
    set(y[2])(two)(2)
    display // display dataTree
    // N1,N2 - nodes
    // L0,L2... - leaves
    -N1 NS // NameSpace
    ---N2 Global
    -----L0 x [0]
    -----L1 z
    -----N3 y [Array 3]
    -------L0 zero [0]
    -------L1 one [1]
    -------L2 two [2]
    ---N2 Local

    savedata(Global.data)(Global) // save node Global in file Global.data
    shell(type Global.data) // display Global.data by command "type"
    result =
    (Global
    (x [0])
    (z)
    (y [Array 3]
    (zero [0])
    (one [1])
    (two [2])
    )
    )

    It is possible to write manually code in format JSON or XML, but may be exist any package in .NET to convert Global.data to Global.json or Global.xml?

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups