Skip to content

Commit

Permalink
Fixed json formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cabird committed Nov 30, 2018
1 parent 7b6f544 commit 5e29014
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PelotonData/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using System.Threading.Tasks;
using Newtonsoft;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using PelotonData.JSONClasses;
using PelotonData.JSONClasses.EventDetails;
using PelotonData.JSONClasses.WorkoutList;
Expand Down Expand Up @@ -164,7 +165,7 @@ public async Task<EventDetails> GetWorkoutEventDetails(RideDatum ride, ILogger l

if (SaveJsonPath != null)
{
var formattedJson = JsonConvert.SerializeObject(JsonConvert.DeserializeObject(response), Formatting.Indented);
var formattedJson = JToken.Parse(response).ToString(Formatting.Indented);
File.WriteAllText(SaveJsonPath, formattedJson);
}
EventDetails details = JsonConvert.DeserializeObject<EventDetails>(response);
Expand Down

0 comments on commit 5e29014

Please sign in to comment.