We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb06c3a commit d182614Copy full SHA for d182614
1 file changed
src/Obj/DataObject.php
@@ -35,6 +35,16 @@ public static function new(array $data = []): static
35
return new static($data);
36
}
37
38
+ /**
39
+ * @param string $json
40
+ *
41
+ * @return static
42
+ */
43
+ public static function fromJson(string $json): static
44
+ {
45
+ return new static(JsonHelper::decode($json, true));
46
+ }
47
+
48
/**
49
* @param array $data
50
* @param bool $override
0 commit comments