[PATCH] Add a VFSFromYAML class and a parser to create it

Argyrios Kyrtzidis kyrtzidis at apple.com
Fri Feb 21 09:24:48 PST 2014


On Feb 21, 2014, at 9:09 AM, Dmitri Gribenko <gribozavr at gmail.com> wrote:

> On Fri, Feb 21, 2014 at 5:02 PM, Argyrios Kyrtzidis <kyrtzidis at apple.com> wrote:
>> The problem with a simple JSON field is that it is not clear that we are depending on the presence of something at the beginning of the file in order to interpret it as JSON.
>> It is more clear to say
>>        the file should have this at the top:
>>                %TAG ! tag:vfs-yaml-file…
>> vs
>>        the file should have this at the top:
>>                {
>>                        ‘version’: 1
> 
> I think it would be easy to do the check the other way.  If we have a
> signature in the binary file that is not valid JSON, we will be
> deciding the file format (text/binary) based on that signature.

So JSON is the default fallback ? I can see benefits both ways, (with default fallback and without), but both should work for allowing switching without any build system changes, leaving the call to Ben.

> 
> Dmitri
> 
> -- 
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/





More information about the cfe-commits mailing list