• Skip to content
  • Skip to link menu
KDE API Documentation - JsonParser Class Reference (GCompris-qt)
  • KDE Home
  • Contact Us
 

GCompris-qt

  • View on LXR
  • Comments
Signals | Public Member Functions | Properties | List of all members
JsonParser Class Reference
Core QML Components

Inherits QtQuick.Item, and QtObject.

Signals

void error (string msg)
 

Public Member Functions

void parseFromUrl (string url, functions validateFunc)
 
void parseString (string json, function validateFunc)
 

Properties

File jsonFile
 

Detailed Description

A QML helper component for loading and validating JSON data.

Definition at line 29 of file JsonParser.qml.

Member Function Documentation

void JsonParser::error ( string  msg)
signal

Emitted upon error.

Parameters
msgError message.
void JsonParser::parseFromUrl ( string  url,
functions  validateFunc 
)

Parse a json string from the given url and return a corresponding object.

Parameters
urlSource URL for the json file to parse. Supported URL-schemes: file://, qrc://.
validateFunccf. parseString
Returns
cf. parseString
void JsonParser::parseString ( string  json,
function  validateFunc 
)

Parse the passed json string and return a corresponding object.

Parameters
jsonJSON string to parse.
validateFuncFunction used to semantically validate the parsed json [optional]. The function must have the signature bool validateFunc(jsonString) and return true if json string is semantically valid, false otherwise.
Returns
The object parsed from json if valid, null if json is syntactically or semantically invalid.

Property Documentation

File JsonParser::jsonFile

File with json content to parse.

Definition at line 35 of file JsonParser.qml.


The documentation for this class was generated from the following file:
  • JsonParser.qml
This file is part of the KDE documentation.
Documentation copyright © 1996-2015 The KDE developers.
Generated on Tue Jun 2 2015 21:47:48 by doxygen 1.8.9.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

GCompris-qt

Skip menu "GCompris-qt"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • File List
  • Modules

Class Picker

Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal