Last active
February 21, 2019 08:34
-
-
Save filippotoso/2a8aa601b17be6b4242f65b90cb1ffd7 to your computer and use it in GitHub Desktop.
Google\Protobuf\Struct to PHP Array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Google\Protobuf\Struct; | |
function struct2array(Struct $struct) { | |
return json_decode($struct->serializeToJsonString(), true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment