Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: Null- json

  1. #11
    Join Date
    Mar 2009
    Location
    Beech Hill - a village near Reading in the UK
    Posts
    2,812

    Default Re: Null- json

    Edgar

    Well, if you are stuck with 19.0, at least do this:

    Code:
    Read_Block channel iChn ucaData -1              // No limit on the size of this (except computer memory)
    
    //...
    
    Get_Argument_Size to iOldSize                   // Save for later
    If (iOldSize < SizeOfArray(ucaData) ;           // If it isn't already big enough...
        Set_Argument_Size (SizeOfArray(ucaData))    //     sets the size to what you need
    Move (UCharArrayToString(ucaData)) to sArchivo  // Now the string will be big enough
    
    // ... Do stuff with the string as required ...
    
    Set_Argument_Size iOldSize                      // Stop wasting memory on strings
    Mike

  2. #12
    Join Date
    Oct 2017
    Location
    Belgium
    Posts
    245

    Default Re: Null- json

    Deleted
    Last edited by WWGT; 19-Sep-2019 at 09:26 AM.

  3. #13
    Join Date
    Feb 2009
    Location
    Colombia
    Posts
    2,509

    Default Re: Null- json

    thanks Mike

    You are a great godfather

    Edgar

  4. #14
    Join Date
    Mar 2009
    Location
    Beech Hill - a village near Reading in the UK
    Posts
    2,812

    Default Re: Null- json


  5. #15
    Join Date
    Mar 2009
    Location
    Beech Hill - a village near Reading in the UK
    Posts
    2,812

    Default Re: Null- json

    Edgar

    I just tried using the sample I posted above in 19.0.

    The only change I made was getting rid of the { Name= } meta-tags (which were only introduced in 19.1) and making "object" and "address" lowercase to match the JSON:
    Code:
    Struct stYourDataType
        Integer   Id
        String    object
        String    address
        Integer[] array
        String    moreStuff
    End_Struct
    Works perfectly.

    Mike

  6. #16
    Join Date
    Feb 2009
    Location
    Colombia
    Posts
    2,509

    Default Re: Null- json

    hi Mike

    My editor changes my address to Address and object to Object, and places them in blue. If I didn't, it would be perfect. Is there any editor settings to avoid this?

    Edgar

  7. #17
    Join Date
    Mar 2009
    Location
    Beech Hill - a village near Reading in the UK
    Posts
    2,812

    Default Re: Null- json

    Edgar

    Well they are blue in mine, but not initial-uppercased. Try looking at Tools --> Configure Editor --> Language/Tabs --> Adjust text case while typing language keywords (needs unchecked).

    Mike

  8. #18
    Join Date
    Feb 2009
    Location
    Colombia
    Posts
    2,509

    Default Re: Null- json

    Hi mike

    Yes, that's the problem, thanks, a hug
    Edgar

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •