encode non-integer and non-string fields with java serializer