Replace deprecated fromValue with encodeToTextBuilder (fix #6)