axsuul
axsuul

Reputation: 7480

What is the correct name for this data format?

I am a perfectionist and need a good name for a function that parses data that has this type of format:

userID:12,year:2010,active:1

Maybe perhaps

parse_meta_data()

I'm not sure what the correct name for this type of data format is. Please advise! Thanks for your time.

Upvotes: 0

Views: 314

Answers (8)

Chris S
Chris S

Reputation: 65436

From the one line you gave, ParseJson() seems appropriate

Upvotes: 0

Mark Redman
Mark Redman

Reputation: 24515

ParseCommaSeparatedNameValuePairs()

ParseDelimitedNameValuePairs()

ParseCommaSeparatedKeyValuePairs()

ParseDelimitedKeyValuePairs()

Upvotes: 0

James Eichele
James Eichele

Reputation: 119144

I would go with:

parse_named_records()

Upvotes: 0

Matthew Slattery
Matthew Slattery

Reputation: 46998

If it's just a list of simple items, each of which has a name and a value, then "key-value pairs" is probably the right term.

Upvotes: 0

Nicolas Buduroi
Nicolas Buduroi

Reputation: 3584

parse_dict or parse_map

Upvotes: 1

Gumbo
Gumbo

Reputation: 655239

If it’s a proprietary data format, you can name it whatever you want. But it would be good to use a common term like serialized data or mapping list.

Upvotes: 0

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798676

Except for the lack of braces and the quotes around the keys, it looks like either JSON or a Python dict.

Upvotes: 1

DigitalRoss
DigitalRoss

Reputation: 146073

parse_tagged_csv()

parse_csv()

parse_structured_csv()

parse_csv_with_attributes()

parse csvattr()

Upvotes: 0

Related Questions