Move artifact loading to artifact.cpp and use JsonDeserializer.