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. json attribute for ienumerable items

json attribute for ienumerable items

Scheduled Pinned Locked Moved C#
jsontutorialquestion
3 Posts 3 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.
  • R Offline
    R Offline
    Raghavendra Kodimala
    wrote on last edited by
    #1

    I am using a model that to be converted into json with Newtonsoft Json as follows MyCars[ Car{ Name:"" Model:"" } Car{ Name:"", Model:"" } ] but I am getting MyCar[ Car[ {Name:"", Model:"" } { Name:"", Model:"" } ] ] how to get first format?

    L Richard DeemingR 2 Replies Last reply
    0
    • R Raghavendra Kodimala

      I am using a model that to be converted into json with Newtonsoft Json as follows MyCars[ Car{ Name:"" Model:"" } Car{ Name:"", Model:"" } ] but I am getting MyCar[ Car[ {Name:"", Model:"" } { Name:"", Model:"" } ] ] how to get first format?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      This has nothing to do with C#. You should try the Newtonsoft forums.

      1 Reply Last reply
      0
      • R Raghavendra Kodimala

        I am using a model that to be converted into json with Newtonsoft Json as follows MyCars[ Car{ Name:"" Model:"" } Car{ Name:"", Model:"" } ] but I am getting MyCar[ Car[ {Name:"", Model:"" } { Name:"", Model:"" } ] ] how to get first format?

        Richard DeemingR Offline
        Richard DeemingR Offline
        Richard Deeming
        wrote on last edited by
        #3

        You'll need to fix your C# model, which you haven't shown.


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

        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