Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
1b43a464
Commit
1b43a464
authored
Sep 28, 2011
by
Rob Jonson
Committed by
Jean-Baptiste Kempf
Oct 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up json output
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
35cb1ed0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
share/lua/intf/modules/httprequests.lua
share/lua/intf/modules/httprequests.lua
+19
-0
No files found.
share/lua/intf/modules/httprequests.lua
View file @
1b43a464
...
@@ -196,9 +196,28 @@ function xmlString(s)
...
@@ -196,9 +196,28 @@ function xmlString(s)
end
end
end
end
--dkjson outputs numbered tables as arrays
--so we don't need the array indicators
function
removeArrayIndicators
(
dict
)
local
newDict
=
dict
for
k
,
v
in
pairs
(
dict
)
do
if
(
type
(
v
)
==
"table"
)
then
local
arrayEntry
=
v
.
_array
if
arrayEntry
then
v
=
arrayEntry
end
dict
[
k
]
=
removeArrayIndicators
(
v
)
end
end
return
newDict
end
printTableAsJson
=
function
(
dict
)
printTableAsJson
=
function
(
dict
)
dict
=
removeArrayIndicators
(
dict
)
local
output
=
dkjson
.
encode
(
dict
,
{
indent
=
true
})
local
output
=
dkjson
.
encode
(
dict
,
{
indent
=
true
})
print
(
output
)
print
(
output
)
end
end
...
...
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