Adding class in JSON File

Hello everybody,
I have a JSON_File whith different content inside like so:
        "title": "LEMON",
        "description": "frame01",
          "frame01": "_01.png"
        "title": "POTATO",
        "description": "frame02",
          "frame02": "_02.png"
In the library there is a symbol named "template" where the information
placed from the JSON-Data whith "sym.createChildSymbol".
                   template.$("title").html(item.title);
                   template.$("description").html(item.description);
                   template.$("frame").css("background-image", "url("+item.frame0+")");
Is it possible to give the different content_data a class (for example fruit and vegetable)
and ask in edge only for the class "fruit" to sort the icons one after another in a content-container ?
Am I thinking in the wrong direction?
Right now I walk through the different parameters an pull the content inside the template,
this works fine. But how to apart fruit from vegetable?
Any help would be fine.
THX

Without opening up the can of worms that asks why you want to do this, the easiest way to get a load rule to see more fields is to create a dummy text file with as many columns as you need and open it with the load rule. The load rule editor will "see" the extra columns, and you can change at will.
Okay, I can't resist -- why do you want to do this? Generation or Level dimension build and you don't know how many generations/levels you're going to have? A parent/child table is going to be much easier to work with and will never require playing around with a load rule as the number of columns never change.
Regards,
Cameron Lackpour

Similar Messages

  • Xcode 3/Interface Builder - Adding classes to NIB file doesn't work

    I'm attempting to learn Objective-C and Cocoa GUI through Apple's "Currency Convertor" tutorial. I'm currently at the "Add the ConverterController Class to Your Nib File" step, and I add ConverterController.h to the Interface Builder project (both by Read Class Files and dragging) and... nothing happens. The tutorial clearly states that the class should appear as a new icon in the MainMenu.nib window. I've tried researching this problem, and it appears to be quite common, however every fix isn't really a fix at all. They all involve using the Identity Inspector for something, which appears very complicated, and is otherwise uncovered in the tutorial. It occurs to me that anyone knowing enough to be able to use this fix wouldn't be reading this tutorial, thus making such answers moot. Any help anyone could provide on this issue would be appreciated.

    The tutorial you linked to should work fine except that they've just got the illustration (Figure 5-3) in the wrong place.
    The placement of that illustration implies that you should see the instance of your class in the MainMenu.nib window right after doing step 2 (where you read your class file). But that's not really true. In reality it's step 3 that gets you the blue box in the MainMenu.nib window and steps 4 and 5 that will transform it from an "Object" into a "ConverterController". Steps 3, 4 and 5 are exactly what Thomvis suggested that you do earlier.
    Steve

  • Working with nested json file

    Hi, i have a nested json file that i want to deserialize, i keep getting an error " Object reference not set to an instance of an object."
    here is my json file
    "Name": "Junius",
    "LastName": "Lekgwara",
    "CellNo": [
    "CellC": "072685345",
    "Voda": "0728589303"
    "Name": "Phuti",
    "LastName": "Gravel",
    "CellNo": [
    "CellC": "08377777777",
    "Voda": "089888888888"
    "Name": "Donald",
    "LastName": "Gravel",
    "CellNo": [
    "CellC": "0791408989",
    "Voda": "0117689009"
    here is my Person class
    Public Class Person
    Private _Name As String
    Public Property Name() As String
    Get
    Return _Name
    End Get
    Set(ByVal value As String)
    _Name = value
    End Set
    End Property
    Private _LastName As String
    Public Property LastName() As String
    Get
    Return _LastName
    End Get
    Set(ByVal value As String)
    _LastName = value
    End Set
    End Property
    Public Property cellno As CellNo
    End Class
    Public Class CellNo
    Public Property CellC As String
    Public Property Voda As String
    End Class
    PersonList class
    Public Class PersonList
    Private _ListPerson As List(Of Person)
    Public Property ListPerson() As List(Of Person)
    Get
    Return _ListPerson
    End Get
    Set(ByVal value As List(Of Person))
    _ListPerson = value
    End Set
    End Property
    Sub New()
    _ListPerson = New List(Of Person)
    End Sub
    End Class
    reading json file, when this sub is called i get an error
    Public Async Sub LoadFromFile()
    Dim reader As String = Await GetFile()
    Dim serializer As DataContractJsonSerializer = New DataContractJsonSerializer(GetType(ObservableCollection(Of Person)))
    Dim ms As MemoryStream = New MemoryStream(Encoding.UTF8.GetBytes(reader))
    Dim listOf As ObservableCollection(Of Person) = New ObservableCollection(Of Person)
    listOf = serializer.ReadObject(ms)
    For Each item In listOf
    list.ListPerson.Add(item)
    Debug.WriteLine(item.Name + " " + item.LastName + " " + item.cellno.CellC + " " + item.cellno.Voda) 'Object reference not set to an instance of an object, on item.cellno.CellC and item.cellno.Voda
    Next
    End Sub
    how can i fix this?

    in your model its just a property. in your json its a list. you have this:
     "CellNo": [
    "CellC": "0791408989",
    "Voda": "0117689009"
    and should be
     "CellNo": 
    "CellC": "0791408989",
    "Voda": "0117689009"
    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

  • Adding Classes to the JAR File's Classpath

    Ques 1- Can I use the wildcard * symbol in Manifest file to add classes/othes jar files to the JAR File's Classpath.I have folder named - Lib . where there are many jar files.Now,do I have to add each jar file by- Class-Path: Lib/jar1-name Lib/jar2-name . Instead, can I do this- Class-Path: Lib/*.jar OR Class-Path: Lib/*.class
    RIDICULOUS....105 views has been made but YET NO ANSWER. Isn't there anybody who knows the answer.
    Edited by: Tanvir007 on Apr 30, 2008 2:21 AM

    Ques 1- Can I use the wildcard * symbol in Manifest file to add ... other jar files ...?No. You could, however, place all your needed JARs in JavaHome/jre1.x.x/lib/ext - if this is a way for you.
    Ques 2 ??
    RIDICULOUS....105 views has been made but YET NO ANSWER.What hindered you to test it yourself?
    And the things we don't know far exceed the things we know. Why do you wonder?
    Have a nice day
    J�rg

  • I am unable to import my json file for my bookmarks.

    I'm unable to import bookmarks. When I go to Bookmarks, there is no organize option. If I go to File->Import, it just says that No programs that contain bookmarks, history, etc could be found even though its very obvious that it never made an attempt to look. Normally I do this in the Bookmarks->Show all bookmarks option without problems. I'm trying to import a json file.

    I'm no good a searching for things in Bugzilla.
    If it helps you the keyboard shortcuts within the Library List are
    Alt+O Organize
    Alt+V Views
    Alt+I Import and Backup
    anything else was added by an extension and has no keyboard shortcut.
    Would be nice to know if that works even when you can't see the Library's toolbar dropdowns but would see the dropdown once the shortcut is entered and be able to continue.

  • Can i delete my exported bookmark html file after i have re imported it and merged it with my restore of my old bookmarks? Same with the json file?

    I have recently reinstalled my OS on a new drive and have just successfully restored my old bookmarks and imported any new bookmarks I had saved since the OS install. I just want to know know if it is safe to delete the json file i restored from since this was on the old drive I want to format and can I also delete the html file i created by exporting my new bookmarks before i started this process?
    Marc

    You can keep a backup copy of that old file or make backups of the JSON backups on the new computer.<br />
    You can decide for yourself if you would have a usage for that file.<br />
    If all bookmarks have been restored successfully then you won't need this backup and you can create a new backup regularly if you have modified or added bookmarks.
    *http://kb.mozillazine.org/Backing_up_and_restoring_bookmarks_-_Firefox

  • Including data in java code from a JSON file

    I have a big JSON file which I read into a javascript program from a file as a script.
    It contains a named array of generalized hash tables, ie:
    var arrayname = [ {...}, {...}, ... ]; in a file srcfile.js.
    I read it into my javascript as <script src="srcfile.js"></script>
    and then just use the array, without doing any parsing, etc.
    I would like to convert the program to Java.
    Is there any way I could do the same thing?
    I find an "include" statement, but only for jsp files.
    Can I "import" the file, or is that only for classes?
    Is that JSON format even legal java? Or would every line need to be declared?
    I like JSON because it's so much easier to write and read than XML, and I don't have to parse it, at least in javascript.
    Thanks for any suggestions you may have.

    You have to explain what you mean by Java program. A web based program? An standalone application?
    Import is only used to import classes. I can't answer the rest of your question since I don't know what you want to do, but there are Java libraries that can parse JSON.

  • How to import .jar files in order to use the classes within this file

    hello guys,
    I'm just wondering how can i import .jar files in order to uses the classes within this file.
    let's take an example:
    i have a folder in which I have many .jar files which contain classes to be called. the full path of this folder is set in the Classpath inside the enviroment variables.
    so does anyone have any idea how can i import these .jar files so i can use the classes?
    thank you.

    Hi,
    My problem is that: I created a Serializable class in a project. And I added this project (first project) to another project (second project). First project is appearing in the second project' s Libraries folder. No problem. I want to create a jar file from second project. i.e. I want to Build second project (I use NetBeans IDE). I am using Build Main Project tab under Run. It is falling out. I am finding it second project' s jar file under its folder. I am clicking on it. But it is NOT WORKING. Do you know WHY. Could you help me please?
    Thanks,

  • [svn:osmf:] 16580: Converted classes and project files to work in flex 3.5

    Revision: 16580
    Revision: 16580
    Author:   [email protected]
    Date:     2010-06-16 17:08:07 -0700 (Wed, 16 Jun 2010)
    Log Message:
    Converted classes and project files to work in flex 3.5
    Modified Paths:
        osmf/branches/zeri-certification/Test_Apps/FlexUnit4/.actionScriptProperties
        osmf/branches/zeri-certification/Test_Apps/MediaTests/.actionScriptProperties
        osmf/branches/zeri-certification/Test_Apps/MediaTests/html-template/history/history.js
        osmf/branches/zeri-certification/Test_Apps/MediaTests/html-template/index.template.html
        osmf/branches/zeri-certification/Test_Apps/MediaTests/src/InstructionsForm.mxml
        osmf/branches/zeri-certification/Test_Apps/MediaTests/src/MediaTests.mxml
        osmf/branches/zeri-certification/Test_Apps/MediaTests/src/ZeriTests.mxml
        osmf/branches/zeri-certification/Test_Apps/Zeri_Custom_Player/.actionScriptProperties
        osmf/branches/zeri-certification/Test_Apps/Zeri_Custom_Player/html-template/history/histo ry.js
        osmf/branches/zeri-certification/Test_Apps/Zeri_Custom_Player/html-template/index.templat e.html
        osmf/branches/zeri-certification/Test_Apps/Zeri_Custom_Player/src/Zeri_Custom_Player.mxml
        osmf/branches/zeri-certification/Test_Apps/Zeri_Custom_Player/src/comps/LogBuffer.mxml
    Added Paths:
        osmf/branches/zeri-certification/Test_Apps/MediaTests/html-template/AC_OETags.js
        osmf/branches/zeri-certification/Test_Apps/Zeri_Custom_Player/html-template/AC_OETags.js
    Removed Paths:
        osmf/branches/zeri-certification/Test_Apps/MediaTests/html-template/swfobject.js
        osmf/branches/zeri-certification/Test_Apps/Zeri_Custom_Player/html-template/swfobject.js

    Hi for anyone getting similar issues,
    the solution is described in http://forums.adobe.com/message/3302944#3302944
    This is not a bug.
    Arnoud

  • Is it possible to set firefox to recreate the daily bookmarkbackup (json) file each time it close as opposed to once a day ?

    From what I understand, Firefox create a daily backup of it's bookmarks in a .json file the first time it closes each day. We found that if a user has already closed Firefox in the present day (and the .json bookmarkbackup file is already created for the present day), it won't add to this file the bookmarks added later in the day at futures Firefox closes...
    So if, for example, places.sqlite gets corrupted later in the day, all new bookmarks added after the first close (and creation of original daily backup) of Firefox aren't backuped...
    Is there any way to set it so that each time it closes for the current day, it regenerate the daily backup of bookmarks with the lastest bookmarked pages?
    Thanks

    Note that a JSON backup is created when you start Firefox and not when you close Firefox.
    You can make Firefox create an automatic HTML backup (bookmarks.html) when you exit Firefox if you set the browser.bookmarks.autoExportHTML pref to true on the about:config page.
    * http://kb.mozillazine.org/browser.bookmarks.autoExportHTML
    That backup is created by default in the profile folder as bookmarks.html, but you can set the file name and path via the browser.bookmarks.file pref on the about:config page.
    * http://kb.mozillazine.org/browser.bookmarks.file
    The browser.bookmarks.file pref doesn't exist by default and you need to create a new String pref with the name browser.bookmarks.file and set the value to the full path of the backup bookmarks file.
    Note: an HTML backup doesn't preserve tags and annotations, so you lose those if you need to import the HTML backup.
    * http://kb.mozillazine.org/Export_bookmarks

  • Creating Private Inner Classes in Separate Files

    I sometimes find myself wanting to use private inner classes to do things, but then moving the classes to separate files and giving them package access just because I don't like having single large files.
    Is there a way to create private inner classes on a class but just save them in another file?
    Thanks,
    John

    For me, short file sizes usually make design structure
    more clear. This can make maintenance easier. It can
    also make browsing the code easier, even if you have a
    good editor or IDE. It is also less intimadating
    psychologically (for me, anyway) to work with a number
    of small files, each one with a distinct purpose, than
    it is to open up a monster, even if the monster does
    represent a coherent design unit in some sense. I
    think this psychological impact may be more important
    than most people give it credit for.The psychological impact is lessened if you use an IDE like VisualAge (where only one method at a time is generally displayed) or use the "Show Source Of Selected Element Only" option in Eclipse.
    It's one thing to say a method should be short and a class should have as few methods as possible. Those forces reduce complexity and ease maintenance. It's another to say a source file should be short. A source file is just a storage artifact; source code could be stored in a database without changing how the programmer interacts with it. The fact that the standard java compiler requires the implementation of nested classes to be stored inside the source file of their containing class is a minor inconvenience. Don't let it discourage you from using inner classes when they make sense. The design should not be driven by source file size considerations.
    >
    But you have added code only with the sole intent of
    making a source file smaller. If Java had amechanism
    for storing nested classes in other files youwouldn't
    do this. My point below was that you shouldn't let
    source file size override the decision to use anested
    class.Why shouldn't I let it? There are plenty of
    non-trivial benefits (the ones I gave above, for
    starters) to working with smaller files.Because all of those benefits can be gained from using a decent IDE. Eclipse is free. It can show only the current method and it can collapse nested classes.
    You say "If
    Java had a mechanism...." Well, I could answer: It
    does have such a mechanism, and that mechanism is
    packages.Packages are not a mechanism for creating private inner classes in separate files. Eclipse has a mechanism for making the fact that they reside in the same source file a non-issue.
    >>
    I am not being cavalier. I have no argument, onlyan
    opinion.Again, you are perfectly entitled to your opinion.
    But if it is truly an opinion, and nothing more, why
    bother telling me about it. You might as well post
    your favorite color. It is the reasons for your
    opinion that interest me, and you still have not
    really given any.I have had lengthy arguments about the issue of method and class size. Like I said before, I prefer very small classes and methods. I also think the number of nested classes should be as small as possible. But I have no problem with large files. Files are just one way to organize source code. The size of the things in the files matters, not the files themselves.

  • [svn:osmf:] 13000: Adding the missing readme file for the captioning sample app.

    Revision: 13000
    Revision: 13000
    Author:   [email protected]
    Date:     2009-12-16 10:36:36 -0800 (Wed, 16 Dec 2009)
    Log Message:
    Adding the missing readme file for the captioning sample app.
    Added Paths:
        osmf/trunk/apps/samples/plugins/CaptioningSample/readme.txt

    Carey,
    I have tried london1a1's workaround, and it has not made any difference.
    It seems that london1a1 suggests changing the Camera.h file in this location:
              Users/london1a1/Documents/DW_NAF/PhoneGapLib/PhoneGapLib/Classes/Camera.h
    Whereas you're saying to change the Camera.h file in this location:
              /Applications/Adobe Dreamweaver CS5.5/Configuration/NativeAppFramework/DWPhoneGap/iphone/PhoneGapLib/Classes/Camera.h
    I've tried changing the Camera.h file in both locations.  Neither has made a difference.

  • How to parse json files

    Hi
    Can anyone help with some In depth tutorials on how to parse json files locally (in the project folder) and online (webservice) in WP8 development
    Thank you in advance
    Jayjay john

    1. Build up a strong type class for this json
    Visual Studio 2013 Hidden Gem: Paste JSON or XML as C# Classes
    2. use Json.Net to Deserialize , like:
    var result = Newtonsoft.Json.JsonConvert.DeserializeObject<yourdatatype>(jsonstring);
    Working with JSON in C#
    在現實生活中,你和誰在一起的確很重要,甚至能改變你的成長軌跡,決定你的人生成敗。 和什麼樣的人在一起,就會有什麼樣的人生。 和勤奮的人在一起,你不會懶惰; 和積極的人在一起,你不會消沈; 與智者同行,你會不同凡響; 與高人為伍,你能登上巔峰。

  • Bookmarks missing cant restore from json file

    All of my bookmarks have suddenly vanished. [Firefox also started to crash and would show no bookmarks until I later created a new profile.] I tried....
    1] restoring from Bookmarks - Show all bookmarks - Import export - Restore.
    [I can see a list of earlier backups of my bookmarks , the Json files, but when I try to restore I get Error 'unable to process the backup file] .
    2] using Places Maintenance add-on but it didn't resolve the problem [I tried all the options, several times and I left it for a long time to run, but it did not seem to do anything at all really].
    3] creating a new Firefox profile using profile manager, and then tried to restore from a .json via restore backup in bookmark manager. I also tried copying and moving file to a different location.
    4] uninstalling and re installing Firefox.
    I still have a all the auto back ups of my bookmarks the [.json files, but no .html backups]. If the .json files are corrupted, is they a way I can repair them and restore a back up?
    I don't know if it happened after an update or not, it might have been an auto update, and I cant really recall doing anything to cause it.
    [I am using windows 7 Home premium 64 sp1, and now have Firefox version 33.0.]
    Really hope you can help, many thanks.

    Use these instructions to get a copy of the old bookmarks backup
    and place it in the new profile. If you need better instructions, just ask.
    '''(Open to the old profile)'''
    Type '''about:support'''<enter> in the address bar.
    Under the page logo on the left side you will see '''Application Basics.'''
    Under this find '''Profile Folder.''' To it’s right press the button
    '''Show Folder.''' This will open your file browser to the current
    Firefox profile. Now '''Close Firefox.'''
    Enter the '''bookmarkbackups''' folder. This is where Firefox makes backups
    of your bookmarks. Look for the '''jsonlz4''' file you want to restore
    (check the time / date / size). Right click on that file and select '''Copy.'''
    '''(Close current Firefox, then open to the new profile)'''
    '''(Repeat above steps to open the new Profile Folder)'''
    Now go back to the profile folder where you started. Rename the file
    '''places.sqlite''' by adding '''.old''' to it. Now right click in the folder
    and select '''Paste.''' The file you just pasted here, rename it to
    '''places.sqlite.''' After you are done, restart Firefox.

  • JSON Files

    I have static JSON files being blocked by Azure. How do I fix it? I've tried the below, including the part for Node.js since I'm using it but that didn't work either.
    http://blogs.msdn.com/b/africaapps/archive/2013/06/07/how-to-serve-static-json-files-from-a-windows-azure-website.aspx
    I tried adding the .json and application/json in the Azure portal but that didn't help. So how do you tell Azure to allow access to the JSON files?
    EDIT (2015.03.10 09:36):
    Never mind. It's working now using the below web.config (from the link above):
    <?xml version="1.0"?>
    <configuration>
    <system.webServer>
    <staticContent>
    <mimeMap fileExtension=".json" mimeType="application/json" />
    </staticContent>
    </system.webServer>
    </configuration>
    Maybe it was Azure taking its time to propagate through.

    Sorry, I take that back, I was thinking .js file. For .json, the config is indeed necessary.
    To test whether what you see is a result of caching, can you try changing the content of the json file and check if it gets downloaded with the change?

Maybe you are looking for