Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
a3363b06
authored
2013-08-15 22:26:07 +0800
by
astaxie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
json change from Indent to none
1 parent
51e625de
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
controller.go
controller.go
View file @
a3363b0
...
...
@@ -216,7 +216,7 @@ func (c *Controller) Abort(code string) {
}
func
(
c
*
Controller
)
ServeJson
(
encoding
...
bool
)
{
content
,
err
:=
json
.
Marshal
Indent
(
c
.
Data
[
"json"
],
""
,
" "
)
content
,
err
:=
json
.
Marshal
(
c
.
Data
[
"json"
]
)
if
err
!=
nil
{
http
.
Error
(
c
.
Ctx
.
ResponseWriter
,
err
.
Error
(),
http
.
StatusInternalServerError
)
return
...
...
@@ -229,7 +229,7 @@ func (c *Controller) ServeJson(encoding ...bool) {
}
func
(
c
*
Controller
)
ServeJsonp
()
{
content
,
err
:=
json
.
Marshal
Indent
(
c
.
Data
[
"jsonp"
],
""
,
" "
)
content
,
err
:=
json
.
Marshal
(
c
.
Data
[
"jsonp"
]
)
if
err
!=
nil
{
http
.
Error
(
c
.
Ctx
.
ResponseWriter
,
err
.
Error
(),
http
.
StatusInternalServerError
)
return
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment