 +static void
 +_outToken(StringInfo str, const char *s)
 +{
-+	if (s == NULL || *s == '\0')
++	if (s == NULL)
 +	{
 +		appendStringInfoString(str, "null");
 +		return;

+			break;
+		case T_BitString:
+			/* internal representation already has leading 'b' */
+			appendStringInfoString(str, value->val.str);
+			break;
+		case T_Null:
+			/* this is seen only within A_Const, not in transformed trees */

index 0000000..eaded0f
--- /dev/null
+++ b/src/backend/nodes/outfuncs_json.c
@@ -0,0 +1,1036 @@
+/*-------------------------------------------------------------------------
+ *
+ * outfuncs_json.c
