I’d like to use a data interchange format that uses no quotation marks. Maybe something based on JSON:
{
param: value,
param: value,
param: {
[{
param: value,
param: value
}, {
param: value,
param: value
}]
}
}
How should I go about parsing something like that in let’s say PHP. Should do it through regular expressions?
Why not use JSON and leverage off the available libraries and tools available to you ? This blog entry details a JSON parser in PHP.
Creating another format seems repetitive and error prone when there are so many well-defined and well-tested options available (JSON, XML, Google Protocol Buffers, YAML).