Encodes the given value with the given writer.
value
writer
Encodes the given value into a String and returns it.