These are chat archives for mikebridge/Liquid.NET

2nd
Dec 2015
Adam Schroder
@schotime
Dec 02 2015 03:33
Any chance LiquidHash could be case insensitive lookup?
Or at least have the option not convert them all to lower()
Mike Bridge
@mikebridge
Dec 02 2015 03:50
@schotime I believe shopify liquid is case sensitive---or do you mean it doesn't work when you use capitals?
Adam Schroder
@schotime
Dec 02 2015 03:54

well the problem is the model is like

public class User {
public string Name {get;set;}
}

then you have to remember to do {{ name }} and {{Name}} doesn't work
make sense?
Mike Bridge
@mikebridge
Dec 02 2015 03:58
is that using ToLiquid() to serialize a POCO?
Adam Schroder
@schotime
Dec 02 2015 03:58
yep
Mike Bridge
@mikebridge
Dec 02 2015 04:50
Ok, I'll have a look when I get a minute. I was thinking I could set it up so you could pass an optional lambda function so you could map the field names however you wanted.
Adam Schroder
@schotime
Dec 02 2015 04:51
yeah that sounds alright...as long as it controllable. pretty sure dotliquid is case insensitive so an option for that would be great also
Mike Bridge
@mikebridge
Dec 02 2015 04:53
It would be a bit more effort to make it case-insensitive---though not too much.
Adam Schroder
@schotime
Dec 02 2015 05:03
wouldn't it just be the LiquidHash creating a Dictionary<string, ....>(StringComparison.IgnoreCase)?