Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cwe_checker
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-gitdep
cwe_checker
Commits
38aaf701
Unverified
Commit
38aaf701
authored
4 years ago
by
Enkelmann
Committed by
GitHub
4 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make ObjectList serialization more readable (#85)
parent
a6e5fa65
master
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
object_list.rs
cwe_checker_rs/src/analysis/pointer_inference/object_list.rs
+3
-5
No files found.
cwe_checker_rs/src/analysis/pointer_inference/object_list.rs
View file @
38aaf701
...
...
@@ -311,16 +311,14 @@ impl AbstractObjectList {
/// Intended for pretty printing, not useable for serialization/deserialization.
pub
fn
to_json_compact
(
&
self
)
->
serde_json
::
Value
{
use
serde_json
::
*
;
let
mut
object_
list
=
Vec
::
new
();
let
mut
object_
map
=
Map
::
new
();
for
(
id
,
(
object
,
offset
))
in
self
.objects
.iter
()
{
let
mut
obj_map
=
Map
::
new
();
obj_map
.insert
(
object_map
.insert
(
format!
(
"{} (base offset {})"
,
id
,
offset
),
object
.to_json_compact
(),
);
object_list
.push
(
Value
::
Object
(
obj_map
));
}
Value
::
Array
(
object_list
)
Value
::
Object
(
object_map
)
}
}
...
...
This diff is collapsed.
Click to expand it.
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