Skip to content

Google Shopping Product: failed to parse JSON object #14

@oco-adam

Description

@oco-adam

Hi, I'm seeing failures when trying to get Google Shopping Product details via the sdk.

Here is a minimal example of the failure:

	oxyclient := ecommerce.Init(username, password)
	productId := "7638094194824001347"
	oxyopts := ecommerce.GoogleShoppingProductOpts{
		GeoLocation: "United Kingdom",
		Parse:       true,
	}
	oxyres, err := oxyclient.ScrapeGoogleShoppingProduct(productId, &oxyopts)
	if err != nil {
		panic(err)
	}
panic: failed to parse JSON object: json: cannot unmarshal object into Go struct field Content.content.pricing of type []ecommerce.Pricing

Note that setting Render: "html" doesn't make any difference - it fails with the same error.
This request does succeed if I set Parse to false.

Any help with this would be much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions