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 build error #51

Closed
michaelboccara opened this issue Nov 3, 2018 · 7 comments
Closed

JSON build error #51

michaelboccara opened this issue Nov 3, 2018 · 7 comments
Labels
Milestone

Comments

@michaelboccara
Copy link
Contributor

Describe the issue

Build errors:

Assets/Vimeo/Scripts/Player/VimeoPlayer.cs(339,34): error CS0234: The type or namespace name Parse' does not exist in the namespace JSON'. Are you missing an assembly reference?
Assets/Vimeo/Scripts/Recorder/VimeoPublisher.cs(55,42): error CS0234: The type or namespace name Parse' does not exist in the namespace JSON'. Are you missing an assembly reference?
Assets/Vimeo/Scripts/Recorder/VimeoPublisher.cs(129,34): error CS0234: The type or namespace name Parse' does not exist in the namespace JSON'. Are you missing an assembly reference?
Assets/Vimeo/Scripts/Recorder/VimeoPublisher.cs(147,34): error CS0234: The type or namespace name Parse' does not exist in the namespace JSON'. Are you missing an assembly reference?
Assets/Vimeo/Scripts/Services/VimeoUploader.cs(93,37): error CS0234: The type or namespace name Parse' does not exist in the namespace JSON'. Are you missing an assembly reference?

Steps to reproduce the problem

Import package vimeo-0.9.3.unitypackage
Build

Unity version

Unity 2017.3.1f1
vimeo-0.9.3.unitypackage

Operating system

Windows 10

@caseypugh
Copy link
Contributor

Thanks for reporting. Will look into it.

@michaelboccara
Copy link
Contributor Author

Just search and replace JSON.Parse with JSONNode.Parse

@caseypugh
Copy link
Contributor

I'm unable to recreate this issue in 2018.2 and 2017.3.1f1. JSON.Parse should exist. Is it possible you have a class called JSON that is conflicting?

@caseypugh
Copy link
Contributor

@michaelboccara which platform were you building for? Windows?

@michaelboccara
Copy link
Contributor Author

Hi, ok I know why the problem is happening with me only: I have other JSON packages installed in my project (with JSON as a namespace rather than a static class). Still strange that the compiler handles this ambiguity in such a bad way. For this package I guess it would be safer to use an explicit naming Vimeo.SimpleJSON.JSON. Or at least SimpleJSON.JSON.

@michaelboccara
Copy link
Contributor Author

I have a forked branch that reproduces the problem and suggests a fix.
#63

Basically I suggest, to avoid problems, not to use the JSON static class, and write
JSONNode node = JSONNode.Parse(jsonString);
instead of:
JSONNode node = JSON.Parse(jsonString);

@caseypugh
Copy link
Contributor

Fixed in #65 - now in master. Thank you, @michaelboccara !

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

No branches or pull requests

2 participants