Skip to content

Commit

Permalink
mention Json\typed in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
azjezz committed Nov 22, 2020
1 parent 39d6490 commit fc07cf2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ async function main(): Awaitable<void> {
'bar' => 6
]);
// $decoded is dict<string, int>
// using reified generics.
$decoded = Json\typed<dict<string, int>>($data);
// using type spec.
$decoded = Json\spec($data, TypeSpec\dict(
TypeSpec\string(), TypeSpec\int();
));
Expand Down

0 comments on commit fc07cf2

Please sign in to comment.