Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

yaml - How to cast value to long in yaml fil

Tags:

yaml

How can I cast a value to long in yaml file. I have tried the way as like float like this:

value: !!long 3000

but it says that class not found long. I have tried Long as well.

like image 345
Bilal Shah Avatar asked Oct 15 '25 14:10

Bilal Shah


1 Answers

long isn't a supported YAML type, so the short answer is, you cannot perform the cast in question.

As a work around, string or binary representations would work. Binary is more machine friendly, but strings are typically easier for people to check & edit by hand.

like image 153
Pikalek Avatar answered Oct 19 '25 14:10

Pikalek



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!