What is the best way to resolve this situation?
You either need to make JsonPetShelters
public, or make GetShelters()
internal.
So you want to be able to call this method from a different assembly? If so, how would you expect callers to use it, without understanding the return type? If not, why is the method public?
Once you've worked out what you want do achieve in a consistent way, making the change should be simple.
EDIT: As you've said you only want code in the same assembly to be able to call the method, just change it to be internal:
internal JsonPetShelters GetShelters()
{
...
}
The compile-time error will go away, and you'll no longer be exposing a member you didn't want to expose in the first place.