-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to output explicit object by yaml_emit() #70
Comments
Consider the following workaround to convert objects to arrays echo yaml_emit(json_decode(json_encode($a),true)); output:
|
I do not believe that the current implementation can be coerced into emitting The extension emits (most) objects as serialized data with an associated |
Perhaps an internal serialization of objects to associative arrays could be considered? It would make it that much easier to use... |
I'm seeing that there is an ini setting for decoding serialized objects |
json_encode()
can ouptut empty object, butyaml_emit()
cannot.Please tell me how to output empty object like
{}
.tested with versions:
php 8.1.8 (Windows x86_64)
php_yaml-2.2.2-8.1-nts-vs16-x64.zip
output:
The text was updated successfully, but these errors were encountered: