diff --git a/Apps.Contentful/Apps.Contentful.csproj b/Apps.Contentful/Apps.Contentful.csproj
index c6c9006..2f09caf 100644
--- a/Apps.Contentful/Apps.Contentful.csproj
+++ b/Apps.Contentful/Apps.Contentful.csproj
@@ -6,7 +6,7 @@
enable
Contentful
The headless content management system
- 1.8.15
+ 1.8.16
Apps.Contentful
diff --git a/Apps.Contentful/HtmlHelpers/EntryToJsonConverter.cs b/Apps.Contentful/HtmlHelpers/EntryToJsonConverter.cs
index 4adfbb1..41d1cf4 100644
--- a/Apps.Contentful/HtmlHelpers/EntryToJsonConverter.cs
+++ b/Apps.Contentful/HtmlHelpers/EntryToJsonConverter.cs
@@ -364,6 +364,9 @@ private static JToken ParseValueFromNode(HtmlNode node)
if (bool.TryParse(textValue, out var boolValue))
return JValue.FromObject(boolValue);
+
+ if (decimal.TryParse(textValue, out var decimalValue))
+ return JValue.FromObject(decimalValue);
return JValue.FromObject(textValue);
}
diff --git a/Tests.Contentful/EntryActionsTests.cs b/Tests.Contentful/EntryActionsTests.cs
index 4d7ad75..fdc073c 100644
--- a/Tests.Contentful/EntryActionsTests.cs
+++ b/Tests.Contentful/EntryActionsTests.cs
@@ -146,8 +146,8 @@ public async Task GetEntryLocalizableFieldsAsHtmlFile_WithoutReferenceEntries_Sh
var entryActions = new EntryActions(InvocationContext, FileManager);
var entryIdentifier = new DownloadContentInput()
{
- Environment = "dev",
- ContentId = "70rcIvfhhD9VjLlMTA3YPz",
+ Environment = "master",
+ ContentId = "4phPDNKF6oE6x7bexnmgGS",
Locale = "en-US"
};
var request = new GetEntryAsHtmlRequest();
diff --git a/Tests.Contentful/EntryTranslationTests.cs b/Tests.Contentful/EntryTranslationTests.cs
index ffb5ea0..4873273 100644
--- a/Tests.Contentful/EntryTranslationTests.cs
+++ b/Tests.Contentful/EntryTranslationTests.cs
@@ -23,8 +23,11 @@ public class EntryTranslationTests : TestBase
public async Task Translate_standard_html_file()
{
var actions = new EntryActions(InvocationContext, FileManager);
- await actions.SetEntryLocalizableFieldsFromHtmlFile(new Apps.Contentful.Models.Requests.Tags.UploadEntryRequest { Content = new FileReference { Name = "contentful-pseudo.html" }, Locale = "de" });
-
+ await actions.SetEntryLocalizableFieldsFromHtmlFile(
+ new Apps.Contentful.Models.Requests.Tags.UploadEntryRequest
+ {
+ Content = new FileReference { Name = "json_fields.html" }, Locale = "en-US"
+ });
}
[TestMethod]
diff --git a/Tests.Contentful/TestFiles/Input/json_fields.html b/Tests.Contentful/TestFiles/Input/json_fields.html
new file mode 100644
index 0000000..5910033
--- /dev/null
+++ b/Tests.Contentful/TestFiles/Input/json_fields.html
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file