@classmethod<EOL><INDENT>def from_json(cls, data):<DEDENT>
required_keys = ('<STR_LIT:location>', '<STR_LIT>',<EOL>'<STR_LIT>')<EOL>optional_keys = ('<STR_LIT>', '<STR_LIT>')<EOL>for key in required_keys:<EOL><INDENT>assert key in data, '<STR_LIT>'.format(key)<EOL><DEDENT>for key in optional_keys:<EOL><INDENT>if key not in data:<EOL><INDENT>data[key] = None<EOL><DEDENT><DEDENT>location = Location.from_json(data['<STR_LIT:location>'])<EOL>direct_normal_irradiance =HourlyContinuousCollection.from_json(data['<STR_LIT>'])<EOL>diffuse_horizontal_irradiance =HourlyContinuousCollection.from_json(data['<STR_LIT>'])<EOL>timestep = data['<STR_LIT>']<EOL>is_leap_year = data['<STR_LIT>']<EOL>return cls(location, direct_normal_irradiance,<EOL>diffuse_horizontal_irradiance, timestep, is_leap_year)<EOL>
Create Wea from json file
            {
            "location": {} , // ladybug location schema
            "direct_normal_irradiance": [], // List of hourly direct normal
                irradiance data points
            "diffuse_horizontal_irradiance": [], // List of hourly diffuse
                horizontal irradiance data points
            "timestep": float //timestep between measurements, default is 1
            }