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

Ошибка парсинга данных пользователя #26

Open
dpr-dev opened this issue May 13, 2017 · 2 comments
Open
Labels
Projects

Comments

@dpr-dev
Copy link

dpr-dev commented May 13, 2017

При запросе Request к хранимой процедуре, которая возвращает объект User, вываливается исключение Newtonsoft.Json.JsonSerializationException, если в списке полей (fields) был параметр exports.

@virtyaluk
Copy link
Owner

@Arthur1PO-14, приведите, пожалуйста, примеры кода, где происходит исключение.

@dpr-dev
Copy link
Author

dpr-dev commented May 21, 2017

Прошу прощения за то, что долго не отвечал. Вот в этой хранимой процедуре вываливается исключение. Если убрать exports из списка дополнительных полей - всё отрабатывает.

var user_id = Args.uid, 
    v = 5.64;
    
var users = API.users.get({
    user_ids: user_id, 
    fields: "exports,counters,maiden_name,military,blacklisted,blacklisted_by_me,crop_photo,is_friend,friend_status,career,is_favorite,is_hidden_from_feed,timezone,screen_name,can_write_private_message,can_send_friend_request,can_post,can_see_all_posts,can_see_audio,music,movies,tv,books,games,about,quotes,interests,activities,wall_comments,connections,personal,common_count,occupation,nickname,relatives,relation,site,education,universities,schools,status,last_seen,followers_count,photo_max_orig,online,domain,has_mobile,contacts,verified,bdate,sex,country,photo_id,city,home_town,has_photo,photo_100,photo_200_orig,photo_200,photo_400_orig,photo_max", 
    v: v
}); 
return users[0];

Код на клиенте:

private Task<Response<User>> GetUserInfoAsync(int id) =>
            _inTouch.Request<User>("execute.getUserInfo", new Dictionary<string, string>
            {
                { "uid", $"{id}" }
            });

@virtyaluk virtyaluk added the bug label Aug 7, 2017
@virtyaluk virtyaluk added this to To Do in IT-i01 Nov 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
IT-i01
  
To Do
Development

No branches or pull requests

2 participants