Skip to main content
added 14 characters in body
Source Link
Philipp
  • 123.2k
  • 28
  • 264
  • 345

There are mature libraries available for either for most programming languages, so there is no need to fiddle around with string operations. The .NET framework has both an XML libraryan XML library and a JSON library.

There are mature libraries available for either for most programming languages, so there is no need to fiddle around with string operations. The .NET framework has both an XML library and a JSON library.

There are mature libraries available for either for most programming languages, so there is no need to fiddle around with string operations. The .NET framework has both an XML library and a JSON library.

added 158 characters in body
Source Link
Philipp
  • 123.2k
  • 28
  • 264
  • 345

When you have deeply nested types, you should use a data format which supports unlimited nesting of objects. Two possible alternatives are the simple JSON and the more complex XML. Both formats look different but work surprisingly similar. They are basically key/value maps where values can also be either primitive data types, other key/value maps or lists of values. This is really useful for backward-compatibility: When you come up with a new key and you don't find it in an old document, you can just assume a reasonable default value. As an additional bonus, both formats are easily human-readable and editable with a common text editor, which is really comfortable for testing and debugging. From the programming point of view: There are mature libraries available for either for most programming languages, so no need to write your own string parser.

Which one you choose is subjective. Personally I prefer JSON over XML because I consider XML to be quite over-engineered for most use-cases (my examples show almost everything JSON has to offer but only scratch the surface of the features of XML), but that's just my opinion.

There are mature libraries available for either for most programming languages, so there is no need to fiddle around with string operations. The .NET framework has both an XML library and a JSON library.

When you have deeply nested types, you should use a data format which supports unlimited nesting of objects. Two possible alternatives are the simple JSON and the more complex XML. Both formats look different but work surprisingly similar. They are basically key/value maps where values can also be either primitive data types, other key/value maps or lists of values. This is really useful for backward-compatibility: When you come up with a new key and you don't find it in an old document, you can just assume a reasonable default value. As an additional bonus, both formats are easily human-readable and editable with a common text editor, which is really comfortable for testing and debugging. From the programming point of view: There are mature libraries available for either for most programming languages, so no need to write your own string parser.

Which one you choose is subjective. Personally I prefer JSON over XML because I consider XML to be quite over-engineered for most use-cases (my examples show almost everything JSON has to offer but only scratch the surface of the features of XML), but that's just my opinion.

When you have deeply nested types, you should use a data format which supports unlimited nesting of objects. Two possible alternatives are the simple JSON and the more complex XML. Both formats look different but work surprisingly similar. They are basically key/value maps where values can also be either primitive data types, other key/value maps or lists of values. This is really useful for backward-compatibility: When you come up with a new key and you don't find it in an old document, you can just assume a reasonable default value. As an additional bonus, both formats are easily human-readable and editable with a common text editor, which is really comfortable for testing and debugging.

Which one you choose is subjective. Personally I prefer JSON over XML because I consider XML to be quite over-engineered for most use-cases (my examples show almost everything JSON has to offer but only scratch the surface of the features of XML), but that's just my opinion.

There are mature libraries available for either for most programming languages, so there is no need to fiddle around with string operations. The .NET framework has both an XML library and a JSON library.

added 158 characters in body
Source Link
Philipp
  • 123.2k
  • 28
  • 264
  • 345

When you have deeply nested types, you should use a data format which supports unlimited nesting of objects. Two possible alternatives are the simple JSON and the more complex XML. Both formats look different but work surprisingly similar. They are basically key/value maps where values can also be either primitive data types, other key/value maps or lists of values. This is really useful for backward-compatibility: When you come up with a new key and you don't find it in an old document, you can just assume a reasonable default value. As an additional bonus, both formats are easily human-readable and editable with a common text editor, which is really comfortable for testing and debugging. From the programming point of view: There are mature libraries available for either for most programming languages, so no need to write your own string parser.

This is how the same character could look in XML:

When you have deeply nested types, you should use a data format which supports unlimited nesting of objects. Two possible alternatives are the simple JSON and the more complex XML. Both formats look different but work surprisingly similar. They are basically key/value maps where values can also be either primitive data types, other key/value maps or lists of values. This is really useful for backward-compatibility: When you come up with a new key and you don't find it in an old document, you can just assume a reasonable default value.

This is how same character could look in XML:

When you have deeply nested types, you should use a data format which supports unlimited nesting of objects. Two possible alternatives are the simple JSON and the more complex XML. Both formats look different but work surprisingly similar. They are basically key/value maps where values can also be either primitive data types, other key/value maps or lists of values. This is really useful for backward-compatibility: When you come up with a new key and you don't find it in an old document, you can just assume a reasonable default value. As an additional bonus, both formats are easily human-readable and editable with a common text editor, which is really comfortable for testing and debugging. From the programming point of view: There are mature libraries available for either for most programming languages, so no need to write your own string parser.

This is how the same character could look in XML:

added 1159 characters in body
Source Link
Philipp
  • 123.2k
  • 28
  • 264
  • 345
Loading
added 1159 characters in body
Source Link
Philipp
  • 123.2k
  • 28
  • 264
  • 345
Loading
added 1159 characters in body
Source Link
Philipp
  • 123.2k
  • 28
  • 264
  • 345
Loading
Source Link
Philipp
  • 123.2k
  • 28
  • 264
  • 345
Loading