Skip to content

Conversation

@Xcyq
Copy link
Contributor

@Xcyq Xcyq commented Sep 4, 2024

What problem does this PR solve?

  1. Fixes the issue where Video.toString() outputs an illegal JSON string. All samples should output valid JSON, but in the example below, line 3 is incorrect:
17:11:13.976 [main] INFO com.iluwatar.partialresponse.App -- Retrieving full response from server:-
17:11:13.985 [main] INFO com.iluwatar.partialresponse.App -- Get all video information:
17:11:14.014 [main] INFO com.iluwatar.partialresponse.App -- {"id": 1,"title": "Avatar","length": 178,"description": "epic science fiction film","director": "James Cameron","language": "English",}
17:11:14.015 [main] INFO com.iluwatar.partialresponse.App -- ----------------------------------------------------------
17:11:14.015 [main] INFO com.iluwatar.partialresponse.App -- Retrieving partial response from server:-
17:11:14.015 [main] INFO com.iluwatar.partialresponse.App -- Get video @id, @title, @director:
17:11:14.022 [main] INFO com.iluwatar.partialresponse.App -- {"id": 3,"title": "Interstellar","director": "Christopher Nolan"}
17:11:14.023 [main] INFO com.iluwatar.partialresponse.App -- Get video @id, @length:
17:11:14.023 [main] INFO com.iluwatar.partialresponse.App -- {"id": 3,"length": 169}
  1. Refactors FieldJsonMapper.toJson for better readability (possibly).

Assertions.assertEquals(expectedDetails, actualFieldsDetails);
}

}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add an extra line at EOF to satisfy github

Copy link

@Ritabrata1080 Ritabrata1080 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash the commits

refactor: json string concat

add an extra line at EOF
@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 6, 2024

Copy link

@Ritabrata1080 Ritabrata1080 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iluwatar iluwatar merged commit 24b4586 into iluwatar:master Oct 6, 2024
@iluwatar
Copy link
Owner

iluwatar commented Oct 6, 2024

Looks good! Thank you for the contribution 🎉

@iluwatar
Copy link
Owner

iluwatar commented Oct 6, 2024

@all-contributors please add @Xcyq for code

@allcontributors
Copy link
Contributor

@iluwatar

I've put up a pull request to add @Xcyq! 🎉

@iluwatar
Copy link
Owner

iluwatar commented Oct 6, 2024

@all-contributors please add @Ritabrata1080 for review

@allcontributors
Copy link
Contributor

@iluwatar

I've put up a pull request to add @Ritabrata1080! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants