Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Riina Antikainen
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 70147ec8
authored
May 29, 2014
by
Juho Juopperi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.codecrew.fi:codecrew/moya into devel
2 parents
b7107a38
827a0e4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
code/MoyaDatabase/src/fi/codecrew/moya/model/converters/JsonAttributeConverter.java
code/MoyaDatabase/src/fi/codecrew/moya/model/converters/JsonAttributeConverter.java
View file @
70147ec
...
@@ -58,7 +58,9 @@ public class JsonAttributeConverter implements AttributeConverter<JsonObject, PG
...
@@ -58,7 +58,9 @@ public class JsonAttributeConverter implements AttributeConverter<JsonObject, PG
// Read the value as JSON
// Read the value as JSON
String
stringValue
=
pgObject
.
getValue
();
String
stringValue
=
pgObject
.
getValue
();
if
(
stringValue
!=
null
)
{
// We must test for "null" because pgObject.getValues() seems to return "null" for null :)
if
(
stringValue
!=
null
&&
!
stringValue
.
toLowerCase
().
equals
(
"null"
))
{
JsonReader
jsonReader
=
Json
.
createReader
(
new
StringReader
(
stringValue
));
JsonReader
jsonReader
=
Json
.
createReader
(
new
StringReader
(
stringValue
));
JsonObject
jsonObject
=
jsonReader
.
readObject
();
JsonObject
jsonObject
=
jsonReader
.
readObject
();
log
.
info
(
"Converted PGobject to JsonObject: {}"
,
jsonObject
);
log
.
info
(
"Converted PGobject to JsonObject: {}"
,
jsonObject
);
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment