mirror of
https://github.com/iv-org/invidious.git
synced 2025-07-30 09:18:28 +00:00
Simplified JSONSkeleton / SkeletonValue situation
This commit is contained in:
parent
1b4ccf9026
commit
d8df81d562
@ -171,11 +171,10 @@ module JSONFilter
|
||||
end
|
||||
|
||||
class FieldsGrouper
|
||||
alias JSONSkeleton = Hash(String, JSONSkeleton)
|
||||
alias SkeletonValue = Hash(String, JSONSkeleton)
|
||||
alias SkeletonValue = Hash(String, SkeletonValue)
|
||||
|
||||
def self.create_json_skeleton(fields_text : String) : SkeletonValue
|
||||
root_hash = SkeletonValue.new
|
||||
root_hash = {} of String => SkeletonValue
|
||||
|
||||
FieldsParser.parse_fields(fields_text) do |nest_list|
|
||||
current_item = root_hash
|
||||
@ -183,7 +182,7 @@ module JSONFilter
|
||||
if current_item[key]?
|
||||
current_item = current_item[key]
|
||||
else
|
||||
current_item[key] = SkeletonValue.new
|
||||
current_item[key] = {} of String => SkeletonValue
|
||||
current_item = current_item[key]
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user