ソースを参照

fixed Json encoding, issue 724

Franco Ponticelli 13 年 前
コミット
8b5d46de4b
2 ファイル変更1 行追加2 行削除
  1. 0 1
      std/haxe/Json.hx
  2. 1 1
      std/php/_std/StringBuf.hx

+ 0 - 1
std/haxe/Json.hx

@@ -125,7 +125,6 @@ class Json {
 			var c = StringTools.fastCodeAt(s,i++);
 			var c = StringTools.fastCodeAt(s,i++);
 			if( StringTools.isEOF(c) ) break;
 			if( StringTools.isEOF(c) ) break;
 			switch( c ) {
 			switch( c ) {
-			case '/'.code: buf.add('\\/');
 			case '"'.code: buf.add('\\"');
 			case '"'.code: buf.add('\\"');
 			case '\\'.code: buf.add('\\\\');
 			case '\\'.code: buf.add('\\\\');
 			case '\n'.code: buf.add('\\n');
 			case '\n'.code: buf.add('\\n');

+ 1 - 1
std/php/_std/StringBuf.hx

@@ -30,7 +30,7 @@
 		b = "";
 		b = "";
 	}
 	}
 
 
-	public inline function add( x : Dynamic ) : Void {
+	public function add( x : Dynamic ) : Void {
 		untyped if( __call__('is_null',x) ) x = 'null' else if( __call__('is_bool',x) ) x = x?'true':'false';
 		untyped if( __call__('is_null',x) ) x = 'null' else if( __call__('is_bool',x) ) x = x?'true':'false';
 		b += x;
 		b += x;
 	}
 	}