Toggle navigation
Toggle navigation
This project
Loading...
Sign in
조수연
/
Find_your_own_personal_color
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
starbucksdolcelatte
2019-05-27 10:08:17 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
74e8072f13d3196e227fad22cea07ce7755e17de
74e8072f
1 parent
ca38f768
add list []
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
getjson.py
getjson.py
View file @
74e8072
import
json
from
collections
import
OrderedDict
class
GetJson
:
def
get_standard
(
self
,
filename
):
with
open
(
filename
,
mode
=
'r'
)
as
f
:
json_data
=
json
.
load
(
f
)
json_data
=
json
.
load
(
f
,
object_pairs_hook
=
OrderedDict
)
# 아래와 같은 계절별 기준값이 들어갈 리스트
result_list
=
[[[],[]
],[[],[]],[[],[]],[
[],[]]]
result_list
=
[[[],[]
,[],[]],[[],[],[],[]],[[],[],[],[]],[[],[],
[],[]]]
'''
spr[standard_1[skin[R,G,B], hair[R,G,B], eye[R,G,B]],
...
...
...
@@ -24,10 +25,14 @@ class GetJson:
i
=
0
j
=
0
for
season
in
json_data
:
print
(
season
)
for
std
in
json_data
[
season
]:
print
(
std
)
for
body_part
in
json_data
[
season
][
std
]:
print
(
body_part
)
result_list
[
i
][
j
]
.
append
(
json_data
[
season
][
std
][
body_part
])
j
+=
1
i
+=
1
j
=
0
return
result_list
...
...
Please
register
or
login
to post a comment