Skip to main content
1 of 2
Doc Brown
  • 220.3k
  • 35
  • 410
  • 623

Some good answers here already. But if I were in your shoes, before throwing XML over board, I would consider the following points:

  • XML is very well supported by the .NET framework and third-party tools, for JSON you will have to choose a third-party library and see if it fulfills all your requirements.

  • if you need manual editing only for a few exceptional cases, then XML will probably suffer your needs. If there is lots of editing to be done, and your list of configuration options has a particular complexity, your users most probably need some kind of dialog based option / configuration application - which means, it does not matter if the underlying XML format is 100% user-friendly. If you don't want to write such a thing, at least you can recommend some kind of XML editor to your users. Tools like XML notepad or the XML tools for Notepad++ work well for lots of people.

  • I guess the chances are higher that your end users have seen some kind of XML before than the chances that they have seen JSON before - which will make it a little bit easier for them to grasp it (if they really have to)

  • if size gets really a problem for uploading the data to a web service, consider using data compression

Actually, if you think about this points, and you don't want to use XML anyway, then go with JSON instead. Using XML or JSON provides you already with standard ways of escaping strings, standard ways of extending your configuration structure afterwards, standard ways of adding comments, and ready-made libs for reading and writing those formats - there is no need to reinvent the wheel with any "custom format".

Doc Brown
  • 220.3k
  • 35
  • 410
  • 623