json_loads_particle
- plasmapy.particles.serialization.json_loads_particle(s, *, cls=<class 'plasmapy.particles.serialization.ParticleJSONDecoder'>, **kwargs)[source]
Deserialize a JSON string into the appropriate particle object.
This function is convenient form of
json.loads
to deserialize a JSON string into a particle object. (Mirrorsjson.loads
withcls
defaulting toParticleJSONDecoder
.).- Parameters:
s (str) – A JSON string.
cls (
json.JSONDecoder
class) – AJSONDecoder
class. (DefaultParticleJSONDecoder
).**kwargs – Any keyword accepted by
json.loads
.