Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
3beb1994
Commit
3beb1994
authored
Jul 10, 2018
by
吕海涛
Committed by
Paul Yang
Jul 10, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add JSON_UNESCAPED_UNICODE option (#4191)
parent
26eeec93
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
GPBJsonWire.php
php/src/Google/Protobuf/Internal/GPBJsonWire.php
+1
-1
Message.php
php/src/Google/Protobuf/Internal/Message.php
+1
-1
No files found.
php/src/Google/Protobuf/Internal/GPBJsonWire.php
View file @
3beb1994
...
@@ -226,7 +226,7 @@ class GPBJsonWire
...
@@ -226,7 +226,7 @@ class GPBJsonWire
$output
->
writeRaw
(
"
\"
"
,
1
);
$output
->
writeRaw
(
"
\"
"
,
1
);
break
;
break
;
case
GPBType
::
STRING
:
case
GPBType
::
STRING
:
$value
=
json_encode
(
$value
);
$value
=
json_encode
(
$value
,
JSON_UNESCAPED_UNICODE
);
$output
->
writeRaw
(
$value
,
strlen
(
$value
));
$output
->
writeRaw
(
$value
,
strlen
(
$value
));
break
;
break
;
// case GPBType::GROUP:
// case GPBType::GROUP:
...
...
php/src/Google/Protobuf/Internal/Message.php
View file @
3beb1994
...
@@ -1563,7 +1563,7 @@ class Message
...
@@ -1563,7 +1563,7 @@ class Message
}
}
break
;
break
;
case
GPBType
::
STRING
:
case
GPBType
::
STRING
:
$value
=
json_encode
(
$value
);
$value
=
json_encode
(
$value
,
JSON_UNESCAPED_UNICODE
);
$size
+=
strlen
(
$value
);
$size
+=
strlen
(
$value
);
break
;
break
;
case
GPBType
::
BYTES
:
case
GPBType
::
BYTES
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment