Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
InstiApp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
RAHUL SHARMA
InstiApp
Commits
41ec711f
Commit
41ec711f
authored
Oct 27, 2019
by
unstablebrainiac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add log to debug JsonSyntaxException
parent
369c0524
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
app/src/main/java/app/insti/api/model/User.java
app/src/main/java/app/insti/api/model/User.java
+9
-1
No files found.
app/src/main/java/app/insti/api/model/User.java
View file @
41ec711f
package
app.insti.api.model
;
import
android.util.Log
;
import
androidx.annotation.NonNull
;
import
com.google.gson.Gson
;
import
com.google.gson.JsonSyntaxException
;
import
com.google.gson.annotations.SerializedName
;
import
java.util.List
;
...
...
@@ -75,7 +78,12 @@ public class User implements CardInterface {
}
public
static
User
fromString
(
String
json
)
{
try
{
return
new
Gson
().
fromJson
(
json
,
User
.
class
);
}
catch
(
JsonSyntaxException
e
)
{
Log
.
d
(
"User"
,
"fromString: "
+
json
);
return
null
;
}
}
@NonNull
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment