Skip to content
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

json: cannot unmarshal string into Go struct field preRow.size of type float64 #27

Open
ERR1R opened this issue Jul 27, 2022 · 1 comment

Comments

@ERR1R
Copy link

ERR1R commented Jul 27, 2022

Hi, seems i have it working with rabbitmq to insert realtime.. but when i update the size i get this message on the api.

2022/07/27 14:24:52 pre.update

2022/07/27 14:24:52 json: cannot unmarshal string into Go struct field preRow.size of type float64

Im sending with php. I thought maybe i should do something like this:


$size = number_format($size, 2);

			$data = array(
				"id"=> $id,
				"name"=> $release,
				"team"=> $team,
				"cat"=> $cat,
				"genre"=>  $genre,
				"url"=>  $url,
				"size"=> $size,
				"files"=> $files,
				"preAt"=> $timestamp,
			);

but same error.

can you help me to fix this?

@ghost
Copy link

ghost commented Nov 27, 2022

You can try strval($size)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant