Giter VIP home page Giter VIP logo

easyjsonparsersample's Introduction

EasyJsonParser

GALLERY0

UE4 Marketplace

https://unrealengine.com/marketplace/ja/slug/easyjsonparser

Description

Usage and sample of EasyJsonParser released in the market place of UE4.

How to use

Json string or Json file after loading, specify the access string and get the value.

GALLERY 1

Specify Access String

Specify the path to the value you want to get by connecting dots.

Simple case

The access string for taking a "prop" value from the following simple Json is prop.

{
  "prop":"abc"
}

When it is a hierarchy of objects

If you have a hierarchy as shown below, connect with dots to create an access string.

In the following case, the access string is obj.prop because we want to take the prop property in the object obj.

{
  "obj":
  {
    "prop":"abc"
  }
}

If the array is included

In the case of the following array, please specify which array element to use.

For example, if you want to take the second prop, it will be obj[1].prop.

If you want to take the first prop, it will beobj[0].prop.

{
  "obj":[
  {
    "prop":"abc"
  },
  {
    "prop":"def"
  }
  ]
}

Get value by type

The following four functions are provided to obtain values ​​from Json:

pic

  • ReadInt(int)
  • ReadFloat(float)
  • ReadString(string)
  • ReadBool(bool)

Enter the access string for "AccessString".

Enter the default value for "DefaultValue". If the specified value does not exist in Json, a default value is returned.

Get object

There are also "ReadObject" and "ReadObjects" methods that get as objects instead of values.

This method can only retrieve object properties.

ReadObject gets one node object.

ReadObjects gets an array of multiple objects.

As shown below, you can use it to get an object in the middle of the hierarchy and then get the properties of that object.

pic

easyjsonparsersample's People

Contributors

ayumax avatar

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.