RaphHaddad/Newtonsoft.Json.Serialization.ContractResolverExtentions — pull request #1 by easytomanage (2014-12-30 04:34:52+00:00)
Title: Refined regular expressions to handle more scenarios

As requested on your blog entry, I've created a pull request. Please do note that I commit my change to SnakeCasePropertyNamesContractResolver even though it does not match the Microsoft naming rules. The reason is two-fold, we can discuss further:

1) DBName is valid per MS since it is a "short" acronym. I would expect it to translate to db_name not d_b_name
2) Where there is a "long" acronym, no behavior is perfect. Say the variable was DBUNAndPW, neither dbun_and_pw is correct nor is d_b_u_n_and_p_w. It is indeterministic, we cannot even assume that every two letters is a short acronym, because it is possible to mix single and double letter combinations, such as ADBICanHandle. My point is, it is more likely that a string of uppercase are a single fragment, and definitely not single letter words (Try mixing :"I" and "A" in a variable name that makes sense in English).