Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed #189 : removed preprint #193

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,9 @@ You can get a print out of the command line options by running the command with
All reports are stored in the directory `log-parser-reports/export/`.

## Changelog
### 1.11.1
### 1.11.2
- [#188](https://github.com/adobe/log-parser/issues/188) We solved problems with exporting when the directory hierarchy is not present.
- [#189](https://github.com/adobe/log-parser/issues/189) The generated JSON when exporting results included unnecessary elements.

### 1.11.0
- **(new feature)** [#10](https://github.com/adobe/log-parser/issues/10) We now have an executable for the log-parser. You can perform a log parsing using the command line. For more information please read the section on [Command-line Execution of the Log-Parser](#command-line-execution-of-the-log-parser).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ public File exportLogDataToJSON(Collection<String> in_headerSet, String in_jsonF

ObjectMapper objectMapper = new ObjectMapper();
objectMapper.writeValue(l_exportFile,
objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(jsonList));
objectMapper.writeValueAsString(jsonList));
} catch (IOException e) {
throw new LogDataExportToFileException("Encountered error while exporting the log data to a JSON file.", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import com.adobe.campaign.tests.logparser.exceptions.LogParserSDKDefinitionException;
import com.adobe.campaign.tests.logparser.exceptions.StringParseException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.hamcrest.Matchers;
import org.testng.Assert;
import org.testng.annotations.Test;

Expand Down Expand Up @@ -233,7 +234,11 @@ public void testSimpleLogACC_SDK_exportDateTimeJSON() throws StringParseExceptio
ObjectMapper objectMapper = new ObjectMapper();
String values = objectMapper.readValue(l_exportedFile, String.class);

assertThat("JSON file contains correct verb definition", values.contains("\"timeStamp\" : \"2024-06-13T03:00:19.727Z\""));
assertThat("JSON file contains correct verb definition and is not prettified", values.contains("\"timeStamp\":\"2024-06-13T03:00:19.727Z\""));
assertThat("JSON file does not contain prettified elements", !values.contains("\n"));
assertThat("JSON file does not contain prettified elements", !values.contains("\t"));
boolean containsNewline = values.contains("\n");
System.out.println("Contains newline: " + containsNewline);

} finally {
l_exportedFile.delete();
Expand Down