1
votes

I'm trying to find a format that will help solve a very particular problem:

  • Text first solution.
  • Ability to specify complex objects in a single text line (properties, key\value, lists, complex objects)
  • Object metadata structure should be separate from the data.

For example: Metadata: Prop1:int|Prop2:string|PropList:int[,] Data: 20|Something|10,20,30

that would mean:

Prop1 = 20

Prop2 = "Something"

PropList = [10,20,30]

Is there any existing serialization format resembling this?

1
I didn't understand your problem well. Do you want to extract data from Metadata? - Saad Zimat

1 Answers

0
votes

I don't see any format can support the scheme from the example you provided. If you really need this schema (Type section, Data section), then you need to write your own parser, and it's easy.

But the most suitable mature format should still be JSON if you don't want to write your own parser.

specify complex objects in a single text line: not YAML, not XML, not INI, not TOML.

Any common format is designed less semantics or business related.