﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>LogViewPlus Support » LogViewPlus Support » Configuration &amp; Customization  » JSON Integer</title><generator>InstantForum 2017-1 Final</generator><description>LogViewPlus Support</description><link>https://www.logviewplus.com/forum/</link><webMaster>LogViewPlus Support</webMaster><lastBuildDate>Sat, 11 Apr 2026 06:06:10 GMT</lastBuildDate><ttl>20</ttl><item><title>JSON Integer</title><link>https://www.logviewplus.com/forum/post/14</link><description>I have a JSON log file. One field is an integer, level. This represents the loglevel (i.e. 50 means this was an error). &lt;br/&gt;&lt;br/&gt;I am trying to figure out if the JSON parser is able to parse this field. It seems that JSON parser expects all of the fields to be of string type (at least that's based on the examples on this site). Can you please verify if it is at all possible to parse this field and have it output its corresponding loglevel as a string (i.e. ERROR, INFO, etc)?&lt;br/&gt;</description><pubDate>Wed, 07 Nov 2018 20:39:08 GMT</pubDate><dc:creator>Email User</dc:creator></item><item><title>RE: JSON Integer</title><link>https://www.logviewplus.com/forum/post/15</link><description>&lt;span style="color: rgb(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: arial, tahoma; font-size: 13.33px; font-style: normal; font-weight: 400; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;Hi,&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style="color: rgb(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: arial, tahoma; font-size: 13.33px; font-style: normal; font-weight: 400; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;Thanks for getting in touch.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style="color: rgb(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: arial, tahoma; font-size: 13.33px; font-style: normal; font-weight: 400; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;The first thing you need to do is get the priority value parsed. You can do this will a specifier like ‘%s{Level}’. This specifier is literally a string so will need to be declared as a string – but this will not prevent LogViewPlus from reading the integer value correctly from the log entry.&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style="color: rgb(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: arial, tahoma; font-size: 13.33px; font-style: normal; font-weight: 400; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;That alone will give you a pretty good parse with the priority number showing up in a ‘Level’ column which can then be search, sorted and filtered.&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style="color: rgb(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: arial, tahoma; font-size: 13.33px; font-style: normal; font-weight: 400; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;The next problem will be converting your numeric type into a known LogViewPlus priority. Unfortunately, there is currently no easy way to do this, but you can write a custom post processor which can convert the Level into a known LogViewPlus priority:&lt;/span&gt;&lt;br/&gt;&lt;span style="color: rgb(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: arial, tahoma; font-size: 13.33px; font-style: normal; font-weight: 400; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;&lt;a href="https://www.logviewplus.com/docs/post_processors.html"&gt;https://www.logviewplus.com/docs/post_processors.html&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style="color: rgb(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: arial, tahoma; font-size: 13.33px; font-style: normal; font-weight: 400; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;Hope that makes sense. Please let me know if you have any further questions or issues.&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style="color: rgb(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: arial, tahoma; font-size: 13.33px; font-style: normal; font-weight: 400; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;Thanks,&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style="color: rgb(34, 34, 34); text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: arial, tahoma; font-size: 13.33px; font-style: normal; font-weight: 400; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;Toby&lt;/span&gt;&lt;br/&gt;</description><pubDate>Wed, 07 Nov 2018 20:39:08 GMT</pubDate><dc:creator>LogViewPlus Support</dc:creator></item></channel></rss>