Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
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
capnproto
Commits
c0d00748
Commit
c0d00748
authored
Nov 09, 2015
by
Kamal Marhubi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Group & with type in reference parameters
parent
ee15e86c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
json.c++
c++/src/capnp/compat/json.c++
+5
-5
No files found.
c++/src/capnp/compat/json.c++
View file @
c0d00748
...
...
@@ -377,7 +377,7 @@ namespace {
class
Parser
{
public
:
Parser
(
kj
::
ArrayPtr
<
const
char
>
input
)
:
input_
(
input
),
remaining_
(
input_
)
{}
void
parseValue
(
JsonValue
::
Builder
&
output
)
{
void
parseValue
(
JsonValue
::
Builder
&
output
)
{
consumeWhitespace
();
KJ_REQUIRE
(
remaining_
.
size
()
>
0
,
"JSON message ends prematurely."
);
...
...
@@ -394,7 +394,7 @@ public:
}
}
void
parseNumber
(
JsonValue
::
Builder
&
output
)
{
void
parseNumber
(
JsonValue
::
Builder
&
output
)
{
// TODO(someday): strtod allows leading +, while JSON grammar does not.
// strtod consumes leading whitespace, so we don't have to.
char
*
numEnd
;
...
...
@@ -403,11 +403,11 @@ public:
advanceTo
(
numEnd
);
}
void
parseString
(
JsonValue
::
Builder
&
output
)
{
void
parseString
(
JsonValue
::
Builder
&
output
)
{
output
.
setString
(
consumeQuotedString
());
}
void
parseArray
(
JsonValue
::
Builder
&
output
)
{
void
parseArray
(
JsonValue
::
Builder
&
output
)
{
// TODO(perf): Using orphans leaves holes in the message. It's expected
// that a JsonValue is used for interop, and won't be sent or written as a
// Cap'n Proto message.
...
...
@@ -437,7 +437,7 @@ public:
consume
(
']'
);
}
void
parseObject
(
JsonValue
::
Builder
&
output
)
{
void
parseObject
(
JsonValue
::
Builder
&
output
)
{
kj
::
Vector
<
Orphan
<
JsonValue
::
Field
>>
fields
;
auto
orphanage
=
Orphanage
::
getForMessageContaining
(
output
);
...
...
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