opuntiaOS - an operating system targeting x86 and ARMv7
1# Copyright (C) 2020-2022 The opuntiaOS Project Authors. 2# + Contributed by Nikita Melekhin <nimelehin@gmail.com> 3# 4# Use of this source code is governed by a BSD-style license that can be 5# found in the LICENSE file. 6 7import json 8 9class Parser(): 10 def __init__(self, input_file): 11 self.decoded_data = None 12 self.input_file = input_file 13 14 def data(self): 15 if self.decoded_data is None: 16 f = open(self.input_file) 17 self.decoded_data = json.load(f) 18 f.close() 19 20 return self.decoded_data 21 22 23 24 25 26