gree / gree/unity-webview

"?" character creating issues with json parsing or receiving from WebView.

Open
#764 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Objective-C++
Stars
2.7k
Forks
734
Avg merge
11h 39m
Merged PRs (30d)
1

Description

WebView console:
sending json to Unity: {"name":"abc","response":{"id":"abcid","answers":[{"elm":"ordering_1","type":"sequence","markType":"item","value":["watch","I","films"],"verification":[0,0,1]},{"elm":"ordering_2","type":"sequence","markType":"item","value":["pictures","paint","I","don't"],"verification":[0,0,0,0]},{"elm":"ordering_3","type":"sequence","markType":"item","value":["you","music?","listen","Do","to"],"verification":[0,0,1,0,0]},{"elm":"ordering_4","type":"sequence","markType":"item","value":["on","you","excursions?","Do","go"],"verification":[0,1,0,0,0]}],"act_id":"xyz","score":3}}

Debug value in Unity:
"{\"name\":\"abc\",\"response\":{\"id\":\"abcid\",\"answers\":[{\"elm\":\"ordering_1\",\"type\":\"sequence\",\"markType\":\"item\",\"value\":[\"watch\",\"I\",\"films\"],\"verification\":[0,0,1]},{\"elm\":\"ordering_2\",\"type\":\"sequence\",\"markType\":\"item\",\"value\":[\"pictures\",\"paint\",\"I\",\"don\'t\"],\"verification\":[0,0,0,0]},{\"elm\":\"ordering_3\",\"type\":\"sequence\",\"markType\":\"item\",\"value\":[\"you\",\"music?%22,%22listen%22,%22Do%22,%22to%22],%22verification%22:[0,0,1,0,0]},{%22elm%22:%22ordering_4%22,%22type%22:%22sequence%22,%22markType%22:%22item%22,%22value%22:[%22on%22,%22you%22,%22excursions?%22,%22Do%22,%22go%22],%22verification%22:[0,1,0,0,0]}],%22act_id%22:%22xyz%22,%22score%22:3}}"

'?' character after "music" seem to be creating issues.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the WebView console payload with the debug value received in Unity, focusing on the transformation around the question marks and encoded quotes. Reproduce the message with the supplied JSON and verify that the received value remains valid JSON with the original question marks preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
unity
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.