json-infer-types
json-infer-types copied to clipboard
Added base64 inferer
I have added a Base64 inferer in the formats folder. A given string is simply checked against a regex. It accepts all base64 allowed signs and includes the trailing =-sign as padding.
Important: How I see it every alphanumeric string could basically be base64 if the length is correct. This would lead to the problem that nearly every string could possibly be infered as base64 eventhough it is a normal string. A solution would be to exclude this inferer generally and to let any library user explicitly include it in the list of used inferers if needed.