Encodes numeric strings as numbers.

When Json string is given, numeric values are given as string, instead it may be better to have them as numbers, which 
enables compatibility with javascript frameworks like Angularjs using Json objects.
added request::segment method.