Reputation: 7480
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
Reputation: 24515
ParseCommaSeparatedNameValuePairs()
ParseDelimitedNameValuePairs()
ParseCommaSeparatedKeyValuePairs()
ParseDelimitedKeyValuePairs()
Upvotes: 0
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
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
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
Reputation: 146073
parse_tagged_csv()
parse_csv()
parse_structured_csv()
parse_csv_with_attributes()
parse csvattr()
Upvotes: 0