5 Replies - 211 Views - Last Post: 25 June 2019 - 09:54 PM Rate Topic: -----

#1 tokei   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 93
  • Joined: 15-December 11

How to handle JSON contents without key ?

Posted 25 June 2019 - 07:27 PM

Hi all,

I don't know where to put this thread to the category. If you know you can move it to the right place.

I have issue , how to handle json contents if some element do not have key name or empty key name.

For example

{ "":"John" }


How to handle this issue ?

Thanks for your help.
Is This A Good Question/Topic? 0
  • +

Replies To: How to handle JSON contents without key ?

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15226
  • View blog
  • Posts: 60,944
  • Joined: 12-June 08

Re: How to handle JSON contents without key ?

Posted 25 June 2019 - 07:57 PM

Cast it as a collection and reference it by index?
Was This Post Helpful? 0
  • +
  • -

#3 tokei   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 93
  • Joined: 15-December 11

Re: How to handle JSON contents without key ?

Posted 25 June 2019 - 08:05 PM

Oh sorry ,

what I mean is , I got the collection Dictionary<string,string> and want to convert to JSON file, it become the error when the key is empty.
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15226
  • View blog
  • Posts: 60,944
  • Joined: 12-June 08

Re: How to handle JSON contents without key ?

Posted 25 June 2019 - 08:14 PM

Your dictionary contains a key of empty string?
Was This Post Helpful? 0
  • +
  • -

#5 tokei   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 93
  • Joined: 15-December 11

Re: How to handle JSON contents without key ?

Posted 25 June 2019 - 08:21 PM

Oh, I see...

Sorry , this is error of my fault.

Ok I understand what do you mean. I will delete this thread later.
Was This Post Helpful? 0
  • +
  • -

#6 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15226
  • View blog
  • Posts: 60,944
  • Joined: 12-June 08

Re: How to handle JSON contents without key ?

Posted 25 June 2019 - 09:54 PM

No, keep it all here for anyone in the future who may have a similar question.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1