Giter Club home page Giter Club logo

Comments (4)

ZeroAviation avatar ZeroAviation commented on August 14, 2024

Here is an example file

example.json

from ulogviewer.

hamster620 avatar hamster620 commented on August 14, 2024

@ZeroAviation Yes, currently using Log line patterns is the only way to parse raw logs including JSON files.

If the file contains valid JSON format data, you can let ULogViewer format the raw JSON data by enabling Format JSON data when reading:
截圖 2023-11-28 清晨7 59 31

Then you will get formatted JSON data:
截圖 2023-11-28 上午8 02 12

Because JSON properties will be separated into multiple lines, it is easier to define Log line patterns with multiple patterns which is more flexible to add/remove patterns in the future. You can also set Way of matching log lines with patterns to Arbitrary order to ignore the order of JSON properties:
截圖 2023-11-28 上午8 05 05

But in your case the JSON file contains incomplete JSON data, ULogViewer cannot parse it correctly. We will try adding ability to parse incomplete JSON data in the next version.

from ulogviewer.

ZeroAviation avatar ZeroAviation commented on August 14, 2024

Hi @hamster620

Thank you for your reply! This is the default output when you select JsonLayout in NLOG.

I will explore alternative options.

Thanks again,
Matt

from ulogviewer.

hamster620 avatar hamster620 commented on August 14, 2024

Now JSON data with multiple root elements can be formatted in 4.0.1.1222.

from ulogviewer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.